My sidebar is gone on single.php
-
Hello, I am using convergence theme and since I updated to latest version of wp my sidebar on single.php is missing. I can see it on the index.php and page.php but for a unknown reason its missing in the single post page. I can provide you url:
http://www.guiawordpress.org/analisis/integrando-instagram-en-wordpress/
Thank you all!!!!
Toni
-
ths error interrupts the rendering of your single post:
Fatal error: Call to undefined function yarpp_sql() in /home/bsjovumg/public_html/guiawordpress.org/wp-content/themes/convergence/single.php on line 58
you possibly need to install/activate the ‘yarpp’ plugin (?)
Thanks for your quick response.
I did it but still having the same issue. Once yarpp is active, the sidebar still missing in single.php. I have been trying to deactivate some plugins but no succes at all.
I still see tha same error message at the bottom of the single post of your link.
possibly, the ‘yarpp’ plugin is broken – try to use the latest version and/or replace the plugin with a new upload.
Never add naked calls to Plugin functions in your template.
Change this:
<?php yarpp_sql() ?>
…to this:
<?php if ( function_exists( 'yarpp_sql' ) ) { yarpp_sql(); } ?>
That way, if the function doesn’t exist, you don’t get a fatal error.
Thank you both.
It was the last version of the plugin, anyway I have delete and download a fresh version, activated and still getting the same errors. What I notice now is the admin bar at the top of the page is missing too. I meant there is the space for the bar but no bar at all.
Change this:
<?php yarpp_sql() ?>
…to this:<?php
if ( function_exists( ‘yarpp_sql’ ) ) {
yarpp_sql();
}
?>That way, if the function doesn’t exist, you don’t get a fatal error.
Thank you Chip.
Where is the file were I have to change that code ?
In single.php there is only this code refring to yarpp:
$results = $wpdb->get_results(yarpp_sql(array('post'),array()));
Thank you again for your help.
Change this:
$results = $wpdb->get_results(yarpp_sql(array('post'),array()));
…to this:
if ( function_exists( 'yarpp_sql' ) ) { $results = $wpdb->get_results(yarpp_sql(array('post'),array())); }
Thank you chip. Is working now. My sidebar and comments area are back.
Never add naked calls to Plugin functions in your template.
That was on the theme itself. I would try to upgrade the theme ASAP. Authors must be aware of this issuee.
Thank you and thank you both.
Toni 🙂
Mr Chip Bennett, you are my new lord and master!! I have been battling for a couple of weeks now trying to get the page that displays my individual posts to display correctly. Only today did I notice that the bottom part of the page was not displaying at all from a section ending with:
<div class="col1"> <h2>Related Posts</h2>
I do not know PHP and there was some terribly complex function call to bring up “Related Posts”. I bought my template from TemplateSold so I did not know about YARRP and did not have it active. When I posted the code that seemed to be creating the error:
<?php $results = $wpdb->get_results(yarpp_sql(array('post'),array())); foreach ( (array) $results as $_post ) : $_post = get_post($_post->ID); ?>
I found out about this plug in called YARPP that the function call was looking for. When I activated the plugin my page still wasn’t working but I eventually found this page where you suggested the fix above. It worked like a dream, and now my page is displaying correctly. Thank you so much. You are a god amongst men.
- The topic ‘My sidebar is gone on single.php’ is closed to new replies.