Customizing search results page

Hi,

Can you take a look at - http://www.wpdept.nl/?s=therapie - and see how I can adjust the top margin so it shows beneath the menu bar? I have used
.search-results .x-container.offset {
margin-top: 350px; /*adjust this value with the actual height of the header */
}

but though that kind off does the job it removes the title somehow.

PS I think there should be an easy way to either customize the search results page within Cornerstone or it should be made possible to somehow connect search results to an existing or custom made page.

1 Like

Hi @yingfuli,

I have checked your Search Result page and found that there are two different problems one is with the Masonry layout, which has been already resolved in the upcoming release of the theme. You can add the following code in the Theme Options > JS.

if (window.jQuery.xIsotope) window.jQuery.xIsotope.settings.animationEngine = 'css';

That will prevent the jQuery errors and restore masonry functionality.

The second point is another ongoing problem with the Sticky Bar and the offset set calculation while the position is set to Relative. You can either set it to the Absolute and check or you can add the following code into the Theme Options > JS to manually set the offset value.

window.csGlobal.csHooks.filter('hash_scrolling_offset', (offset) => {
    return offset - 120;
} );

You can also customize the Search Result page by creating an Archive Layout using the Layout Builder and assigning it with the condition of Search Result is being viewed.

I would also suggest you go through the following article on the Layout Builder.



Hope it helps.
Thanks

Ah, great! Thank you.

Hi @yingfuli,

Glad that we are able to help you.

Thanks

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