Archived topic
Search Results
9 replies · Started by Klaus on August 17, 2019
Hello, my search results page does seem to have two problems: I have set the Blog featured image in the customizer to "Alignment: left", but it seems to be ignored on the results page (I would like to display the image left and the text floating around the image). And the "read more" button does not show, where I have added my own excerpt and it shows where the excerpt is created automatically. Regards Klaus
One more question: I get my blog styling on other blog pages through WPShowPosts. Is it possible to create a search results blog page with WPShowPosts?
Hi there,
currently your Blog and Search pages are looking the same with the image below the site title. If you want to change the layout i can take a look.
No, WP Show Posts can't be used for the Search results page.
Yes, please have a look. As I wrote: my first problem is, that the blog settings in the customizer are in parts ignored: the featured image is definitely not “Alignment: left”. The second problem, as you can see, is that the "read more" buttons do not show in parts: And the “read more” button does not show where I have added my own excerpt and it shows where the excerpt is created automatically.
I have installed WpShowPosts and have my category-posts shown with custom WPShowPost-Pages. I understood, that the Serch-Results-Page is designed as a Blog Page. So a Search Results Page always should look like a Blog Page, shouldn't it? Klaus
In your Blog settings make sure the Image is set to Above Title. Then the alignment left should work.
You need to add this PHP snippet to add the Read More button to custom excerpts:
https://docs.generatepress.com/article/activating-read-custom-excerpt/#read-more-button
Thanks, the button-snippet works, but to set the featured image above title didn't solve my issue. Couldn't I use a snippet also? Klaus
Hello, I have set the featured image in the blog customizer to "Above title": it doesn't work. I disabled plugins, cleared caches, and I finally added this snippet:
add_filter( 'option_generate_blog_settings', 'lh_custom_search_results_page_settings' );
function lh_custom_search_results_page_settings( $options ) {
if ( is_search() ) {
$options['post_image_position'] = 'post-image-above-header';
$options['post_image_alignment'] = 'post-image-aligned-left';
}
return $options;
}
I can customize everything on the search results / blog page: but I'm not able to move the (featured) image to the left.
Hi there,
Give this CSS a shot:
.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image {
float: left;
margin-right: 1.5em;
margin-bottom: 1em;
}
Let me know :)
Perfect. Great thank you. Kind Regards Klaus
You're welcome :)