Archived topic
Search Results column Issue
16 replies · Started by Patricia on February 19, 2022
Hi there,
I have encountered an issue with the search results leaving a blank space that should’ve been an item https://prnt.sc/gTdkczpNXrQy.
the posts was set to show 3 columns https://prnt.sc/hAxxXgHbMjHV but even if I set to 4 or 5, it will still a blank.
please help. thanks
The page I need help with: https://www.myhomeselection.co.uk/?s=main+course
Hi there,
theres something odd going on there - see here:
https://www.screencast.com/t/KbrsE2no
The highlighted post is outputting a separate post inside itself, making that column really tall.
This kinda thing generally happens when there is some broken HTML in the single post. Do you have any hooked in elements or custom HTML being added to the post content ?
Hi David,
thanks for the response.
i dont think we have hook in elements or custom HTML (that has open tags). i have also double checked.
this happens in the search results page only regardless of the search query. ex: https://www.myhomeselection.co.uk/?s=breakfast has the same
Hi Patricia,
I did a quick glimpse of how the site is structured and I see you have a lot of custom HTML on the site placed on different GP elements.
Some of these probably has some syntax issues that's causing this issue.
I understand that this can be tedious but can you temporarily disable ALL of these Blocks elements and Hook elements? This is to find the culprit element.
Hi Elvin,
yep we have some custom HTML in GP elements but none of them are broken or has an open tag. i have double checked already.
Can we see this Custom HTML ?
yes please. it's in the GP Elements section. i have already given the logins when i started this thread. thanks :)
Wow - theres a lot of them.
I think the first thing needed is to ascertain whether there is an issue with anything in those elements.
And the simplest way to do that is to temporarily disable them all.
Which can be done either by selecting ALL and Quick Editing, and change their Status to Draft.
Or Temporarily Disable the Elements Module in Appearance > GeneratePress.
If the site is live, you may want to push it to a staging before doing that.
Hi, i have created a staging site and temporarily disabled all the elements. it's still the same.
OK so each and every one of the 'nested' layouts has this broken HTML:
https://www.screencast.com/t/LZpY5TRIDj6
Which is the Read More link.
Do you have any functions related to the read more or excerpt ?
hi David, yup i have just checked and we have a function for the except which you suggested before https://generatepress.com/forums/topic/excerpt-limit-to-be-character-count-instead-of-word-count/#post-1707853
i have tried removing, it fixes the nested issue. but we will still need the "Excerpt limit to be character count instead of word count (https://generatepress.com/forums/topic/excerpt-limit-to-be-character-count-instead-of-word-count/) "
OK so glad you found what was breaking it.
Regarding the excerpt. Is there a Read More link/button required ?
regarding the read more, we are aiming for character count limit instead of the default word count as per https://generatepress.com/forums/topic/excerpt-limit-to-be-character-count-instead-of-word-count/
Sorry i am trying to ascertain whether you need the Read More Button wherever an excerpt is displayed. If so you can try the Snippet that Tom provided here:
https://generatepress.com/forums/topic/excerpts-change-to-charaters-not-words/#post-837081
Again you need to adjust the 200 for number of characters in this line:
$excerpt = substr( $excerpt, 0, 200 );