Site logo

Archived topic

Exclude custom header content in search entry summary

21 replies · Started by stlayman on May 3, 2018

Viewing posts 1–15 of 22

Hi there. I'm using custom headers on my site. I added the search bar as a widget on my blog pages. But when I run a search, the results are showing the contents of my custom header (navigation, etc...) as the "search entry" summary for all results. Is there a way to block custom header content for search results and use the normal snippets?

Anybody? maybe this is not possible? thanks

Hi Stacy,

So sorry that your topic was missed! Always feel free to poke us if you don't receive an answer within 24 hours.

That is very strange. Have you checked with Beaver Builder? It looks like it's all being treated as content. I wonder if they have a way to exclude a specific module from being included as "content".

I'm using BB custom row shortcode in the GP custom header wrap. Guess I'll try explaining that to them and see if I get anywhere. Thanks

Let me know if they don't have any ideas. They might have a way to exclude certain rows from excerpts.

I surely will report back :)

Hi Tom, here's what they said: :(

"You can create Manual Excerpts for each Post, or you'll have to replace the header with one that comes from the theme."

More: (I'm using the global location setting for my page header "Search Results")

"If they are inserted on the header, they will be treated as such. But on the single Posts on your site, they're not inserted to the header. They're inserted as part of the content instead. Check the screenshot attached for reference. Notice how the highlighted row, which is your header, is inside the entry-content class. :)"

Ah yes, the Beaver Builder area is actually inside your content area on single posts.

Have you considered using the same method you used for your search results? Adding the BB section into a Page Header, and applying it to single posts?

Hi Tom, I've selected my custom header for Post Types > Single posts in global locations, is that what you mean?

I am disabling the regular header on all pages inside the editor, is there a better way to show only the custom headers, while keeping the header container?

Please disregard posts. Actually I noticed it's only happening on PAGES search results.

I re-enabled the header for this page and cleared the BB cache... and the search results are still showing the navigation. https://www.whww.com/?s=culture

So, for now I'm just hiding the excerpts and featured images for pages only. Searching posts will still show the excerpts correctly. I've asked BB if there is a way to exclude a node from the search results query.

.search .page .entry-summary,
.search .page .post-image
{
display: none;
}

This archived topic is closed to new replies.