Archived topic
Customize Search Result, Sticky Nav's Auto hide, WP Show Posts' Lists
5 replies · Started by Dong on July 4, 2020
Hello,
I'm a new GP Premium user. Love the theme so far!
My website: dongknows.com
I would like to do a couple of things:
1. Have search results displayed in 3 (or 4) columns without the excerpts, while keeping the current 2-column layout of the front pages and other categories intact.
2. Sticky Navigation's "Hide when scrolling down" in effect ONLY when a post is open, and not at the front page, etc.
3. Customize the font size of the WP Show Posts' post lists individually. Right now I can use CSS to change the font size but that applies to ALL lists.
Thank you!
-Dong.
Hi there,
1. This PHP Snippet:
https://docs.generatepress.com/article/using-columns-in-the-blog/#changing-the-number-of-columns
2. You can use the option_generate_menu_plus_settings filter:
https://docs.generatepress.com/article/option_generate_menu_plus_settings/
3. Styling specific posts is best done with the Pro version of the plugin.
Or you can target each list using the #wpsp-18308 ID selector. the 18308 is the ID of the list.
Thanks, David.
1. Any way to remove the "Read More" button from the search result? I figured out how to review the excerpt.
2. I used this code:
add_filter( 'option_generate_menu_plus_settings','dn_custom_homepage_menu_plus_settings' );
function dn_custom_homepage_menu_plus_settings( $options ) {
if ( is_front_page() )
{
$options['auto_hide_sticky'] = 'false';
}
return $options;
}
But the sticky menu still auto-hide on the front page. I have Menu Plus activated. Please advise.
Hi there,
1. Try this:
.search-results .entry-summary {
display: none;
}
2. This should do it:
add_filter( 'option_generate_menu_plus_settings', 'dn_custom_homepage_menu_plus_settings' );
function dn_custom_homepage_menu_plus_settings( $options ) {
if ( is_front_page() ) {
$options['auto_hide_sticky'] = false;
}
return $options;
}
Thanks, Tom.
No problem :)