Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #228647

    Hello,

    How I can do to display the title and category of a portfolio item instead of the title and excerpt in a portfolio grid?

    Thanks in advance!

    #229478

    Hey Helchar!

    Open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/portfolio.php and replace:

    
    				switch($contents)
    				{
    					case "excerpt": $excerpt = $entry->post_excerpt; $title = $entry->post_title; break;
    					case "title": $excerpt = ''; $title = $entry->post_title;  break;
    					case "only_excerpt": $excerpt = $entry->post_excerpt; $title = ''; break;
    					case "no": $excerpt = ''; $title = ''; break;
    				}
    

    with

    
    				switch($contents)
    				{
    					case "excerpt": $excerpt = $entry->post_excerpt; $title = $entry->post_title; break;
    					case "title": $excerpt = ''; $title = $entry->post_title;  break;
    					case "only_excerpt": $excerpt = $entry->post_excerpt; $title = ''; break;
    					case "no": $excerpt = ''; $title = ''; break;
    				}
    
                    $cats = get_the_term_list($the_id, 'portfolio_entries', '', ', ','').' ';
    
                    if(!empty($cats))
                    {
                        $excerpt = '<span class="blog-categories minor-meta">'.__('in','avia_framework')." ";
                        $excerpt .= $cats;
                        $excerpt .= '</span>';
                    }
    

    This code will replace the excerpt text with the category list.

    Cheers!
    Peter

    #230039

    Perfect!!
    Thank you.

    #230062
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Enfold Portfolio Grid, Category display’ is closed to new replies.