Custom results search page displays no preview image

Hi,

I created a custom search result page, which displays preview image and title
https://theme.co/forum/t/customise-search-results-page-using-loopers/90036

But when the page/post does not have a preview image dedicated,
then the search result page displays an arrow


Is there a way to have like a standard image?
Or controle the placing and size of the icon (arrow) ?

Thanks

Hello @MeesterOntwerpers,

Thanks for writing to us.

It seems that you are using the preset template where Icon only comes when the Featured Image is not set.

You can change its position as per your design since it would only be visible if the Post featured image is not set.

In case you want to add the placeholder image if the Post Featured image is not set then please follow these steps.

  1. Add an Image element
  2. Upload a placeholder image
  3. Now you need to set conditions for the Image element for that you need to go to the Image element —>Customize —>Condition —>Set the condition like this.

Please have a look at our documentation to learn more about how to set the condition

Hope it helps
Thanks

Thanks again, that fixed it very easily!

One more question, is it possible to use Conditions to display a row/column/element etc.
if the search input doesn’t match with any of the site content (page/blog etc.) ?

Is it possible with string is not search_query or am I way off?

thanks!

Hey @MeesterOntwerpers,

There’s no option in Cornerstone to show an element when the result is empty or doesn’t match with any site content. What you have in mind can be done with custom CSS where we hide the content base on the body class of the page result. Regretfully, providing custom CSS code is outside the scope of our theme support. You may seek 3rd party developers to help you with your problems or you can avail One where we can answer questions outside of the features of our theme.

Hope that helps and thank you for understanding.

HI @marc_a

Or did I find the solution using Conditions… :thinking:

{{dc:query:found_posts}} is 0

Please tell me I’m right?

Hi @MeesterOntwerpers,

You can use the condition to check whether the Looper is returning any values or not with the {{dc:query:found_posts}} and shows the element or values accordingly.

Hope it helps.
Thanks

hi @tristup,

thanks for your reaction, I think it works :upside_down_face:

Cheers!

You are most welcome @MeesterOntwerpers

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.