Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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.
    #586114
    #586136

    Hi 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…

    blog post

    The green link is the category tag

    What a portfolio item looks like…

    portfolio 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.
    #586920

    Hi!

    Please follow the instructions here: https://kriesi.at/support/topic/enfold-portfolio-grid-category-display/#post-229478

    Best regards,
    Ismael

    #587022

    Morning,

    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.
    #587291

    Sorry 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

    #588129

    Hey!

    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!
    Ismael

    #588297

    Morning,

    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

    #589570

    Hey!

    My bad. It’s inside the 1 column markup. Please use this portfolio.php file: http://pastebin.com/r6GpmWxJ

    Best regards,
    Ismael

    #589657

    Top banana :)

    Works a treat.
    If I ever meet you I owe you a drink.

    Thanks

    TJ

    #590633

    Hi!

    Cheers! :)

    Best regards,
    Ismael

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘portfolio grid category’ is closed to new replies.