Forums

Catchable fatal error (5 posts)

  1. tenkabuto
    Member
    Posted 4 years ago #

    I'm getting this error in my sidebar, I'm not very familiar with WordPress so I don't have any ideas why it should be doing this. D=

    Catchable fatal error: Object of class stdClass could not be converted to string in /home2/vc/public_html/blog/wp-includes/category-template.php on line 31

    You can view the page here.

  2. whooami
    Member
    Posted 4 years ago #

    well without knowing what is inside that theme file thats causing the error, its like, impossible, to help you.

  3. tenkabuto
    Member
    Posted 4 years ago #

    This is my entire sidebar.php file:

    <div id="sidebar">
    <ul id="sidelist">

    <?php /* Widgetized sidebar, if you have the plugin installed. */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    <?php endif; ?>

    <?php
    // this is where 10 headlines from the current category get printed
    if ( is_single() ) :
    global $post;
    $categories = get_the_category();
    foreach ($categories as $category) :
    ?>

  4. <h2>More from this category</h2>
    <ul class="bullets">
    <?php
    $posts = get_posts('numberposts=10&category='. $category->term_id);
    foreach($posts as $post) :
    ?>
  5. "><?php the_title(); ?>
  6. <?php endforeach; ?>

  7. " title="View all posts filed under <?php echo $category->name; ?>">Archive for '<?php echo $category->name; ?>' »
  8. <?php endforeach; endif ; ?>

    <?php if ( is_home() ) { ?>

  9. <h3><?php
    // this is where the name of the News (or whatever) category gets printed
    wp_list_categories('include=8&title_li=&style=none'); ?></h3>
    <?php
    // this is where the last three headlines are pulled from the News (or whatever) category
    query_posts('showposts=3&cat=8');
    ?>
    <ul class="bullets">
    <?php while (have_posts()) : the_post(); ?>
  10. " rel="bookmark"><?php the_title(); ?>
  11. <?php endwhile; ?>

    <?php } ?>

  12. <h3>Browse Archives</h3>
    <form id="archiveform" action="">
    <select name="archive_chrono" onchange="window.location =
    (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
    <?php get_archives('monthly','','option'); ?>
    </select>
    </form>
  13. <h3>Browse Categories</h3>
    <ul class="subnav">
    <?php wp_list_categories('title_li='); ?>

  14. <h3>Ads & Sponsors</h3>
  15. <h3>Contributors</h3>

    <ul class="bullets">
    <?php wp_list_authors
    ('exclude_admin=0&show_fullname=1&hide_empty=1&feed_image=' .
    get_bloginfo('template_url') . '/images/rss.gif&feed=XML'); ?>

  16. <!--END SIDELIST-->
    </div><!--END SIDEBAR-->

  17. tenkabuto
    Member
    Posted 4 years ago #

    I accidentally posted twice, the first was using a blockquote, this one with a code tag, sorry: D=

    <div id="sidebar">
    		<ul id="sidelist">
    
    	<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    		<?php endif; ?>
    
    <?php
    // this is where 10 headlines from the current category get printed
    if ( is_single() ) :
    global $post;
    $categories = get_the_category();
    foreach ($categories as $category) :
    ?>
    <li><h2>More from this category</h2>
    <ul class="bullets">
    <?php
    $posts = get_posts('numberposts=10&category='. $category->term_id);
    foreach($posts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    
    <?php endforeach; ?>
    
    <li><strong><a href="<?php echo get_category_link($category);?>" title="View all posts filed under <?php echo $category->name; ?>">Archive for '<?php echo $category->name; ?>' &raquo;</a></strong></li>
    </ul>
    </li>
    <?php endforeach; endif ; ?>
    
    <?php if ( is_home() ) { ?>
    <li><h3><?php
    	// this is where the name of the News (or whatever) category gets printed
    	wp_list_categories('include=8&title_li=&style=none'); ?></h3>
    		<?php
    // this is where the last three headlines are pulled from the News (or whatever) category
    		query_posts('showposts=3&cat=8');
    		?>
    		<ul class="bullets">
     	<?php while (have_posts()) : the_post(); ?>
          <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
     	<?php endwhile; ?>
     	</ul>
     	</li>
    <?php } ?>
    
    	<li><h3>Browse Archives</h3>
    	<form id="archiveform" action="">
    <select name="archive_chrono" onchange="window.location =
    (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
    	<?php get_archives('monthly','','option'); ?>
    	</select>
    	</form>
    	</li>
    
    <li><h3>Browse Categories</h3>
    <ul class="subnav">
    <?php wp_list_categories('title_li='); ?>
    </ul>
    </li>
    
    <li><h3>Ads &amp; Sponsors</h3>
    </li>
    
    <li><h3>Contributors</h3>
    
    <ul class="bullets">
    <?php wp_list_authors
    ('exclude_admin=0&show_fullname=1&hide_empty=1&feed_image=' .
    get_bloginfo('template_url') . '/images/rss.gif&feed=XML'); ?>
     </ul>
    </li>
    
    </ul><!--END SIDELIST-->
    </div><!--END SIDEBAR-->
  18. tenkabuto
    Member
    Posted 4 years ago #

    Can someone please help?

Topic Closed

This topic has been closed to new replies.

About this Topic