Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #293351

    Hi, how can I display categories assigned to portfolio posts, so they appear as a label (highlighted in red text) in my portfolio grid, either above or below the post’s title?

    Thanks, Richard

    #293364

    Hey Richard!

    Try adding this at the very end of your theme functions.php file:

    function add_stuff_to_portfolio_grid($output, $entry) {
    	$term_list = get_the_term_list( $entry->ID, 'portfolio_entries', '', ', ' );
    	return $term_list;
    }
    add_filter('avf_portfolio_extra', 'add_stuff_to_portfolio_grid', 10, 2);

    Cheers!
    Josue

    #293418

    Thanks, this is great.

    Can I set it instead to display under the preview image in the portfolio grid, and left aligned, in caps?

    Best wishes,
    Richard

    #293420

    Hi,

    Open /config-templatebuilder/avia-shortcodes/portfolio.php and look for line (460-461):

    $output .= apply_filters('avf_portfolio_extra', "", $entry);
    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size )."</".$link_markup[1].">";

    Replace it by this:

    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size )."</".$link_markup[1].">";
    $output .= apply_filters('avf_portfolio_extra', "", $entry);

    And add this to the Quick CSS:

    .grid-entry a[rel='tag'] {
        text-transform: uppercase;
        float: left;
    }
    

    Regards,
    Josue

    #293425

    Thanks Josue,

    I made that change in the CSS and it now displays on the left in caps – great!

    I also made the change in portfolio.php but it still displays the category above the preview image?

    Best wishes,
    Richard

    #293427

    Hi,

    Can you please create me an administrator account? post it here as a private reply.

    Regards,
    Josue

    #294284
    This reply has been marked as private.
    #294526

    Hi!

    I couldn’t login because its locked by IP address (403 Permission Denied!).

    Cheers!
    Josue

    #294868

    How strange. Do I need to change some setting on my server?

    #294910
    This reply has been marked as private.
    #295083

    Hi!

    Add this code to Quick CSS:

    .grid-entry .grid-image{
    clear: both;
    }

    Best regards,
    Josue

    #295085

    That fixed it. Thanks!

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

The topic ‘Display portfolio post categories’ is closed to new replies.