Resposive problem with sidebar
-
Hi,
I have a problem with the search result page.
http://www.rivista.dreamhosters.com/?s=cjcgjI don’t see the result message:
Nothing Found
Sorry, but nothing matched your search terms. Please try again with some different keywords.
I’ve made many changes, can I know what can it be…?
Thanks!
-
Hi @d4rkcloud
Great to hear from you. Looks like your site is coming along nicely.
Child Theme
Are the changes in your child theme style.css file in one place? Or are they scattered? Ideally, what we need to do to help your site’s load time is to only have your customisations in the child style.css file. WordPress already loads style.css from the Ultra parent theme so we’re doubling up if we have the entire style.css file in the child theme too. Please, send me some info on what’s happened with style.css in the child and I’ll assist further.
Search Results
Have you perhaps made changes to the file content-none.php?
Ehm, no… I didn’t touch content-none.
This is the code:
<?php
/**
* The template part for displaying a message that posts cannot be found.
*
* Learn more: http://codex.ww.wp.xz.cn/Template_Hierarchy
*
* @package ultra
* @since ultra 0.9
* @license GPL 2.0
*/
?><?php if ( is_home() && current_user_can( ‘publish_posts’ ) ) : ?>
<p><?php printf( __( ‘Ready to publish your first post? Get started here.’, ‘ultra’ ), esc_url( admin_url( ‘post-new.php’ ) ) ); ?></p>
<?php elseif ( is_search() ) : ?>
<header class=”page-header”>
<div class=”container”>
<h1 class=”page-title”><?php echo wp_kses_post( siteorigin_setting( ‘text_no_results_heading’ ) ); ?></h1>
</div><!– .container –>
</header><!– .page-header –><div class=”container”>
<div id=”primary” class=”content-area”>
<main id=”main” class=”site-main” role=”main”><p><?php echo wp_kses_post( siteorigin_setting( ‘text_no_results_copy’ ) ); ?></p>
<?php get_search_form(); ?><?php else : ?>
<p><?php _e( ‘It seems we can’t find what you’re looking for. Perhaps searching can help.’, ‘ultra’ ); ?></p>
<?php get_search_form(); ?><?php endif; ?>
What can it be??
P.S.: thanks for the complments!!!
Thanks for the update.
Would it be possible to ZIP your child theme, upload it to your Media Library and send the link? That way I can take a look at the setup locally on my side.
Thanks for the update.
Did you have a chance to go over my feedback earlier regarding the style.css file in your child theme? The same advice is applicable to the rest of the child theme. Have you made modifications to all the files in your child theme? Only the files you’ve edited should be in the child theme folder. Including the entire theme negates updates. It means that anything that gets updated in future versions won’t reflect.
Ideally, we need to start by fixing your child theme. We’ll most likely resolve this situation by doing so. We’ll also be preventing future issues.
If you want to do this. Start with style.css and compare it to the original using DiffMerge:
https://sourcegear.com/diffmerge/
Only the opening comments in your child style.css file and the rules you have changed should be included.
Next, we’d move onto the theme files. You could use DiffMerge to compare each file to the original or you could just manually check each one for changes. Files that haven’t been changed should be removed.
If you just want to focus on this no search results issue I’d start by removing content-none.php from the child theme and see what happens.
Hi, I removed the content-none.php and removed the “useless” files, but nothing changed…
Here’s the page:http://www.rivista.dreamhosters.com/?s=shgdasfhad%3CsjThanks for the update 🙂 I’ll take another look ASAP.
Could you please confirm:
Appearance > Theme Settings > Text: are the following fields populated?
No Search Results Heading
No Search Results TextThanks
No, they’re empty!
I’ve filled them, but there’s some text more…
http://www.rivista.dreamhosters.com/?s=cavallaI’d also like to change a bit the page, showing the featured images of the post found and, in cas of no results, a list of cateories and post.
You think it’s possible?
P.S.: thank you for the great support!!!
Ok cool, glad to hear you made progress on the original question.
http://www.rivista.dreamhosters.com/?s=cjcgj
That’s fixed then.Your next questions:
Search Results: Extra text
This is hardcoded into the loop:
<div>Eccoti tutti i risultati</div>You can remove it from line 36 of search.php in your child theme.
Search Results: Adding a featured image
The file you need to edit to adjust the search results page is content-search.php.
Just below theentry-summarydiv, insert the following:<?php if ( has_post_thumbnail() && siteorigin_setting('blog_post_featured_image') ) : ?> <div class="entry-thumbnail"> <?php the_post_thumbnail(); ?> </div> <?php endif; ?>That should render the featured image.
Search Results: No results
To change the no results content, edit content-none.php in your child theme. To render categories you could insert the following on line 32 of content-none.php:
<?php if ( ultra_categorized_blog() ) : // Only show the widget if site has multiple categories. ?> <div class="widget widget_categories"> <h2 class="widget-title"><?php _e( 'Most Used Categories', 'ultra' ); ?></h2> <ul> <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10, ) ); ?> </ul> </div><!-- .widget --> <?php endif; ?>You could then use a query to display a single post. Here is some help to get started with that:
Hope that helps.
The topic ‘Resposive problem with sidebar’ is closed to new replies.
