Topic Resolution: Resolved
  • Creator
    Topic
  • #18234

    Frank Stellmacher
    Spectator
    Been thanked: 0 times

    Hi, I enanbled featured Images in Theme Options –> Blog. When the result of a search find a page without an image, the featured image frame is empty (of cource) in the search result. Is there a possibility to hide this “empty frame” in search result when no Image was found?

    Thank you, Frank

    Example: http://nupsoft.com/en/solutions/ –> use search (sitebar on the right) –> type in i. e. jennifer (first match)

Viewing 6 replies - 1 through 6 (of 6 total)
Replies
  • Imran
    Spectator
    Post count: 403
    Been thanked: 0 times
    #18235 |

    Hi Frank,

    Thanks for writing in,

    To achieve this you can add following code under Appearance > Theme Options > Custom CSS:

    Thanks.

    Frank Stellmacher
    Spectator
    Post count: 18
    Been thanked: 0 times
    #18236 |

    Hi Imran,
    thanks for your answer. My Problem here is, I have 84 pages with Images on it, but none of them have defined a “featured Image”, because I do not want to show it on the page.
    Without your css it seems, that the search result just take an image out of the page content and view it in the search result as a featured Image…that is fine and exactly want i want.

    But I have a few pages without any Image and as I said, I do not want to define a featured Image in “edit page Options”, because i do not want it on the page itself.

    If there is no way to do so, maybe there is a work around: Can I defined for all pages a featured Image under page edit Option, and is there a code to hide it then on each page (….display: none;)???

    Thank you!

    Frank Stellmacher
    Spectator
    Post count: 18
    Been thanked: 0 times
    #18244 |

    Hi Imran,

    here are the results (each page does not has a featured Image, just 2 posts have):
    Without your code : http://nupsoft.com/?s=jennifer
    With your code: http://nupsoft.com/en?s=jennifer

    Maybe their is a chanche to do something in the search.php of my child theme?

    Imran
    Spectator
    Post count: 403
    Been thanked: 0 times
    #18256 |

    Hi Frank,

    You can simply add the featured images to your pages and then add this CSS code to hide the featured image only from the single pages. Please add the following code under Appearance > Theme Options > Custom CSS:

    Thanks.

    Frank Stellmacher
    Spectator
    Post count: 18
    Been thanked: 0 times
    #18260 |

    Hi Imran, perfect…with this solution I can decide myself, which image should be shown in the search results!

    Thanks for your help and best regards, Frank

    Imran
    Spectator
    Post count: 403
    Been thanked: 0 times
    #18281 |

    You’re welcome Frank! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.