-
AuthorPosts
-
July 19, 2014 at 2:53 pm #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
July 19, 2014 at 4:05 pm #293364Hey 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!
JosueJuly 19, 2014 at 6:11 pm #293418Thanks, 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,
RichardJuly 19, 2014 at 6:23 pm #293420Hi,
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,
JosueJuly 19, 2014 at 6:40 pm #293425Thanks 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,
RichardJuly 19, 2014 at 6:50 pm #293427Hi,
Can you please create me an administrator account? post it here as a private reply.
Regards,
JosueJuly 22, 2014 at 12:33 pm #294284This reply has been marked as private.July 22, 2014 at 6:51 pm #294526Hi!
I couldn’t login because its locked by IP address (403 Permission Denied!).
Cheers!
JosueJuly 23, 2014 at 11:34 am #294868How strange. Do I need to change some setting on my server?
July 23, 2014 at 12:22 pm #294910This reply has been marked as private.July 23, 2014 at 7:13 pm #295083Hi!
Add this code to Quick CSS:
.grid-entry .grid-image{ clear: both; }
Best regards,
JosueJuly 23, 2014 at 7:17 pm #295085That fixed it. Thanks!
-
AuthorPosts
- The topic ‘Display portfolio post categories’ is closed to new replies.