Skip to:
Content
Pages
Categories
Search
Top
Bottom

Catchable Error


  • codyrauh
    Participant

    @codyrauh

    WILD ORIGIN
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/a2pewpnas01_data03/66/3912866/html/wp-content/themes/simplenotes/functions.php on line 118

    I know it is to do with something in my template that bbpress doesn’t like, is there a simple fix for this without removing my theme?

Viewing 3 replies - 1 through 3 (of 3 total)

  • codyrauh
    Participant

    @codyrauh

    so from what I have read it is something to do with the “echo” and that forums to have categories.

    }
    endif;
    function simplenotes_get_breadcrumbs(){
    	global $wp_query; 
    	if ( !is_home() ){
    		echo '<ul>';
    		echo '<li><a href="'. home_url() .'">'. get_bloginfo('name') .'</a></li>';
    		if ( is_category() ) 
    		{
    			$catTitle = single_cat_title( "", false );
    			$cat = get_cat_ID( $catTitle );
    			echo "<li> &nbsp; ► ". get_category_parents( $cat, TRUE, " ► " ) ."</li>";
    		}
    		elseif ( is_archive() && !is_category() ) 
    		{
    			echo "<li> &nbsp; ► Archives</li>";
    		}
    		elseif ( is_single() ) 
    		{
    			$category = get_the_category();
    			$category_id = get_cat_ID( $category[0]->cat_name );
    			echo '<li> &nbsp; ► '. get_category_parents( $category_id, TRUE, "</li><li> &nbsp; ► " );
    			echo the_title('','', FALSE) ."</li>";
    		}
    		elseif ( is_page() ) 
    		{
    			$post = $wp_query->get_queried_object(); 
    			if ( $post->post_parent == 0 ){ 
    				echo "<li>&nbsp; ► ".the_title('','', FALSE)."</li>";
    			} else {
    				$title = the_title('','', FALSE);

    codyrauh
    Participant

    @codyrauh

    found solution


    Robin W
    Moderator

    @robin-w

    would be great if you posted the solution to help others

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar