Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #170393

    How can i show the RELATED POSTS function / widget on the portfolio single entry-pages and on the blog post pages ???
    And how can I use the THE 20 LATEST PORTFOLIO ENTRIES widget from the archive/sitemap template page on other pages???
    My site address is: http://www.peterarchitektur.com

    • This topic was modified 4 years, 1 month ago by  Peter.

    Hey Peter!

    1) Portfolio Entries will display entries within the same category as related entries and the standard posts will use the post tags to determine which entries are related to the current post. You just need to make sure that two or more posts share the same tags and that two or more portfolio entries share the same category.

    2) You can use the “Corona Latest Portfolio” widget to display your latest portfolio entry in the sidebar.



    Hey Peter!

    1). I made the changes recommended by you in the post tags (Blog page) and in the portfolio categories ( I have 7 entries in the “Locuinţe individuale” category), but still I can not see the related entries (Related Posts).
    What can I do further?

    2). THE 20 LATEST PORTFOLIO ENTRIES widget from the Corona archive/sitemap template page can not be used on other pages>? I do not want to use it in sidebar.
    Or THE 20 LATEST PORTFOLIO ENTRIES widget from the Corona archive/sitemap template page it is not a widget? (Corona Archive/Sitemap Template)


    My site address is: peterarchitektur.com

    • This reply was modified 4 years, 1 month ago by  Peter.


    First go to the theme files and open includes>admin>register-portfolio.php.

    That first function needs to be replaced with this one:

    function portfolio_register() 
    	$labels = array(
    		'name' => _x('Portfolio Items', 'post type general name'),
    		'singular_name' => _x('Portfolio Entry', 'post type singular name'),
    		'add_new' => _x('Add New', 'portfolio'),
    		'add_new_item' => __('Add New Portfolio Entry'),
    		'edit_item' => __('Edit Portfolio Entry'),
    		'new_item' => __('New Portfolio Entry'),
    		'view_item' => __('View Portfolio Entry'),
    		'search_items' => __('Search Portfolio Entries'),
    		'not_found' =>  __('No Portfolio Entries found'),
    		'not_found_in_trash' => __('No Portfolio Entries found in Trash'), 
    		'parent_item_colon' => ''
    	$slugRule = avia_get_option('portfolio-slug');
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'show_ui' => true,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    		'query_var' => true,
    		'show_in_nav_menus'=> false,
    		'taxonomies' => array('post_tag'),
    		'supports' => array('title','thumbnail','excerpt','editor','comments')
    	register_post_type( 'portfolio' , $args );
    		array(	"hierarchical" => true, 
    		"label" => "Portfolio Categories", 
    		"singular_label" => "Portfolio Categories", 
    		"rewrite" => true,
    		"query_var" => true

    At some point showing the tags on the posts got removed but that will add it back in.

    Then related posts will show on portfolio items that are in the same categories (must be exact) with common tags.

    2) That is the widget as a shortocode which is available from the magic wand icon.

    Best regards,


    Hey Devin!

    1). I replaced the first function with the text posted by you. I used FileZilla to edit the register-portfolio.php. and to upload back in the corona theme. But unfortunately has no effect at all and still I can not see the related entries (Related Posts) on the portfolio single entry-pages and on the blog post pages.
    What can I do else to correct this problem?

    2). I found the shortocode (content slider) under the magic wand icon like you said, but after I included the pictures along with the column layout, in the result widget created so the photos do not have rounded corners as those of the kriesi.at – corona theme demos (under Archive/Sitemap Template – page)

    Thanks in advance!



    Can you please create me an admin account and post the login credentials as private reply. I’ll check why the related portfolio entries don’t show up on your website.

    The code on the “Archive Template” page is not a widget – thus you can’t use it in the sidebar, etc. If you really want to use it you can install a plugin like: http://wordpress.org/plugins/insert-php/ which enables you to embed php code directly into the page/post content. Then use following php code

    				* Display the latest 20 portfolio posts
    				query_posts(array('posts_per_page'=>20, 'post_type'=>'portfolio'));
    				// check if we got posts to display:
    				if (have_posts()) :
    				echo "<h3>" . __('The 20 latest Portfolio Entries','avia_framework') . "</h3>";
    				$columns = 4;
    				if(strpos($avia_config['layout'], 'dual')) $columns = 3;
    				$slidecount = 0;
    				$postcount = ($columns * 1);
      				$count = 1;
    	     		$output = "";
    	        	$output .= "<div class ='latest-portfolio-archive'>";
    	     		$output .= "<div class='content_slider autoslide_false'>";
    	     		while (have_posts()) : the_post(); 
    	     			$slidecount ++;
    	     			if($count == 1)
    	     				$output .= "<div class='single_slide single_slide_nr_$slidecount'>";
    	     			$image = "<span class='related_posts_default_image'></span>";
    		 			$slides = avia_post_meta(get_the_ID(), 'slideshow', true);
    		 			//check if a preview image is set
    		 			if( $slides != "" && !empty( $slides[0]['slideshow_image']) )
    		 				//check for image or video
    		 					$image = avia_image_by_id($slides[0]['slideshow_image'], 'related', 'image');
    		 					$image = "<span class='related_posts_default_image related_posts_video'></span>";
    	     			$output .= "<div class='relThumb relThumb".$count."'>\n";
    		 			$output .= "<a href='".get_permalink()."' class='relThumWrap noLightbox'>\n";
    	     			$output .= "<span class='related_image_wrap'>";
    	     			$output .= "<span class='rounded_corner rctl'></span>";
    					$output .= "<span class='rounded_corner rctr'></span>";
    					$output .= "<span class='rounded_corner rcbl'></span>";
    					$output .= "<span class='rounded_corner rcbr'></span>";
    		 			$output .= $image;
    		 			$output .= "</span>\n";
    		 			$output .= "<span class='relThumbTitle'>\n";
    		 			$output .= "<strong class='relThumbHeading'>".avia_backend_truncate(get_the_title(), 50)."</strong>\n";
    		 			$output .= "</span>\n</a>";
    		 			$output .= "</div><!-- end .relThumb -->\n";
    	     			if($count == $columns+1)
    	     				$output .= "</div>";
    	     				$count = 1;
    	 	 		if($count != 1) $output .= "</div>";
    	     		$output .= "</div></div>";
    	     		echo $output;

    to display the portfolio entries.

    Best regards,

    This reply has been marked as private.

    It looks like the non regular characters in the tags/categories are preventing a match from occurring on the related items. I’m not sure if the code is easily modified to support non basic latin characters but an easy fix would be to have either modified or shortened tags/categories like I’ve done on this item: http://peterarchitektur.com/portfolio-item/casa-dj/ with cat1 and tag1.


    Hey Devin!

    Finally, with your last post, I managed to reactivate the Related Posts entry on my pages. :-)

    Thanks for the big help!

    Best regards,

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘RELATED POSTS – widget / entry / function ???’ is closed to new replies.