-
AuthorPosts
-
February 19, 2016 at 12:34 pm #585982
Post slider, blog post elements when in grid layout all follow a certain order
1) image
2) category tag
3) title
4) excerpt
5) footer (date / comments)Is there a few to style the portfolio grid so it follow the same order? The main thing I want is the category tag to be on all portfolio items. I have turned off sorting on some pages and they instead show a random selection of portfolio items but no category is shown. I’d use blog / post slider but I like the features of the portfolio grid (random order, ajax opening).
Thanks in advance :)
TJ
- This topic was modified 8 years, 10 months ago by tjswarbs78.
February 19, 2016 at 3:29 pm #586114Hi tjswarbs78!
check out: http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/
Cheers!
AndyFebruary 19, 2016 at 3:51 pm #586136Hi andy,
I’m not after changing the sort order for the portfolio I am wanting to add the category tag to the portfolio grid elements.
I have the blog and portfolio set to grid view so each item looks like a little card.
Each blog looks like this…The green link is the category tag
What a portfolio item looks like…
I would like the portfolio category to appear above the name like it does for blog items.
I know i could display portfolio items using the post slider or blog post element but I want to make use of the AJAX function that comes with portfolio grid.Thanks
- This reply was modified 8 years, 10 months ago by tjswarbs78.
February 22, 2016 at 8:04 am #586920Hi!
Please follow the instructions here: https://kriesi.at/support/topic/enfold-portfolio-grid-category-display/#post-229478
Best regards,
IsmaelFebruary 22, 2016 at 11:25 am #587022Morning,
I did spot that the other day and it does kind of do the job as it adds in the category, however, it removes the excerpt. Anyway to have the excerpt AND the category together?
I imagine it is just tweaking that php code but that’s beyond me.
Had a play with the PHP but no luck, any ideas?
Thank guys / gals
TJ
- This reply was modified 8 years, 10 months ago by tjswarbs78.
February 22, 2016 at 5:13 pm #587291Sorry to bump this to the top… please don’t yell at me ;)
Post was getting lost down the pages. Any ideas if it’s possible?
Thanks
February 24, 2016 at 5:35 am #588129Hey!
My bad. I didn’t check the code on the previous thread. Please look for this code again:
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; }
.. and below that, add this:
$cats = get_the_term_list($the_id, 'portfolio_entries', '', ', ','').' ';
Afterwards, look for this block of code around line 458:
$output .= "<div class='av_table_col first portfolio-entry grid-content'>";
.. below, add this:
if(!empty($cats)) { $output .= '<span class="blog-categories minor-meta">'.__('in','avia_framework')." "; $output .= $cats; $output .= '</span>'; }
NOTE: You have to remove the previous modifications.
Cheers!
IsmaelFebruary 24, 2016 at 11:45 am #588297Morning,
The code didn’t seem to do anything. Only the excerpt is showing still. Below is snippet from the php file…
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', '', ', ','').' '; $custom_overlay = apply_filters('avf_portfolio_custom_overlay', "", $entry);
$output .= apply_filters('avf_portfolio_extra', "", $entry); $output .= "<div class='av_table_col first portfolio-entry grid-content'>"; if(!empty($cats)) { $output .= '<span class="blog-categories minor-meta">'.__('in','avia_framework')." "; $output .= $cats; $output .= '</span>'; } if(!empty($title)) { $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
Any ideas?
If you test it your end and it works could you send me the portfolio.php file somehow?Thanks
February 26, 2016 at 7:17 am #589570Hey!
My bad. It’s inside the 1 column markup. Please use this portfolio.php file: http://pastebin.com/r6GpmWxJ
Best regards,
IsmaelFebruary 26, 2016 at 11:24 am #589657Top banana :)
Works a treat.
If I ever meet you I owe you a drink.Thanks
TJ
February 29, 2016 at 10:41 am #590633 -
AuthorPosts
- The topic ‘portfolio grid category’ is closed to new replies.