Okay
  Public Ticket #402462
excerpt instead of the category
Open

Comments

  • Romain started the conversation

    Hello,

    Just like hadleybk posted a year ago, when I rollover the portfolio items, it shows the title, category, and the button. I want to show the excerpt instead of the category. (where it says Episode on the screenscapture) https://infinit.io/link/Romain_Capelle/HpBX8tdYou were talking about changing something in shortcodes.php at lines 2283 or 2317. But I can't find what to change (The code probably changed along with the updates)

    Thanks a lot,

    Romain

  •  399
    Qode replied

    Hi,

    in order to change this go to your shortcodes.php file and find this code below inside portfolio list from line 2603 to 2611 http://screencast.com/t/LKeUxu3UvZ0

    $html .= '<span class="project_category">';
    $k = 1;
    foreach ($terms as $term) {
        $html .= "$term->name";
            if (count($terms) != $k) {
                $html .= ', ';
            }
            $k++;
    }

    and replace it with following code

    $html .= '<span class="project_excerpt">';
    $html.= get_the_excerpt();

    so it now looks like this http://screencast.com/t/wqN0dkuZME

    After that go to Qode Options -> General -> Custom CSS filed and paste this code below

    .project_excerpt {
    line-height: 22px;
    display: block;
    font-size: 13px;
    font-weight: 500;
    }

    Best Regards,

    Qode

  • Romain replied

    AWESOME THANK YOU !

  • Tobias replied

    Hi,

    It appears that this section of code in shortcode.php has changed in the recent Bridge update. Can you update us on how do display the excerpt in the new version?

    Tobias

  •  399
    Qode replied

    Hello Tobias,

    if you are showing your portfolio list like Romain ( type is standard, or standard with no space, or masonry with space) , then now, in the same file, shortcodes.php , you will need to change the lines from 2856 to 2864 (http://screencast.com/t/rGSsBc4p47 ) in the same way as explained before.

    Replace it with

    $html .= \'<span class=\"project_excerpt\">\';
    $html.= get_the_excerpt();

    and paste down written stylings into your custom CSS field in Qode Options -> General

    If that doesn\'t do the job for you, send us a link to your page so we can see which type of portfolio list you are using.

    Best Regards,

    Qode

  • Tobias replied

    Thanks,

    One follow up question: Can I put the modified shortcodes.php file in my child theme folder to keep it from getting written over when updating bridge? Do I put it in the child theme root or do I have to make a folder structure mirroring its location in the main bridge theme?

    Tobias

  •  399
    Qode replied

    Hi Tobias,

    No. Because shortcodes.php file is not one of template files. What you need to do is to put modified function from that file into child themes\' function.php file to make your modifications upgrade proof.

    Best regards

    Qode

  •  1
    Maripaz replied

    Hello,

    I'd like to achieve just the same as Romain and Tobias and I'm trying to follow this process, but I'm finding that the current shortcodes.php file (the one located at includes > shortcodes > shortcodes.php) is now just 89 lines long, so I don't know what I should replace in this version...

    Could you kindly advise?

    FYI: I'm using the Bridge child theme.

    Thanks in advance!

  • Tobias replied

    Hi Maripaz,

    I was successful at getting the project excerpt to show up however I decided it wasn't a good idea because the shortcodes.php file gets rewritten every time the theme updates, a major pain. I tried but I couldn't figure out how to make a "modified function" as Qode suggested. If you have more skills than maybe you can be successful.

    Good luck,

    Tobias

  •  1
    Maripaz replied

    Oh, I see... I'm not surely more skilled than you, as I'm a designer avobe all, and if I've got some programming skills, that's in CSS but not in php :-))

    Well, let's wait for Qode response, hopefully there's a renewed solution...

    Many thanks for your reply Tobias!!

  •  1,117
    Qode replied

    Hello,

    In recent versions of our theme you can find shortcode for portfolio list in bridge theme folder>includes>shortcode-elements>portfolio-list.php. You can't override this file in your child theme and you need to be careful  with theme updates, you can backup this file and  make changes every time when you update the theme.

    The new and improved Online Bridge Documentation is live. Check it out now - LINK

    Also check our articles with useful tips and suggestions

    Best Regards,

    Qode

  • Javi replied

    Hello, I followed this steps but my web is still showing the category. What's wrong?? http://www.screencast.com/t/hOufBcqrx

    https://nataliaeiriz.com/portfolio

    Thank you!

  •  1,117
    Qode replied

    Hello Javi,

    Solution we provided eariler is an old solution and many thinhs has been changed in the meantime

    Portfolio List can display only portfolio titles and categories, not excerpts - it works the same way in all our demos. 

    However, we have a custom solution to display excerpts for Portfolio List - Standard with default hover animation type. It requires modifying one of the theme files, so you would have to repeat it after the theme update. Here are the instructions: 

    Insert excerpt line below inside this file: wp-content/themes/bridge/includes/shortcodes/shortcode-elements/portfolio-list.php

    $html .= '<div class="portfolio_excerpt">'.get_the_excerpt().'</div>';

    ...here https://monosnap.com/file/LygP2fiAb5kTN8T27gDooxVLkwYZWm

    After that, add custom css code below into Qode Options > General > Custom Code > Custom CSS field:

    .portfolio_excerpt {
      font-size: 14px;
      line-height: 20px;
      color: black;
      padding-top: 10px;
    }
    

    The result: 

    https://monosnap.com/file/cLyq85RFbTUvaegB9TU7vKwTE0TPm0

    Best regards, 

    The new and improved Online Bridge Documentation is live. Check it out now - LINK

    Also check our articles with useful tips and suggestions

    Best Regards,

    Qode

  • EthicalTime replied

    It worked! Thank you very much

  •  1,117
    Qode replied

    You're welcome.

    The new and improved Online Bridge Documentation is live. Check it out now - LINK

    Also check our articles with useful tips and suggestions

    Best Regards,

    Qode

  • Sanna replied

    This was good. I found this via Google and even for the right template! I was just about to make my own ticket. I think this is something that could be useful to be in the template as standard. It can be used in so multiple ways having small texts added. Thanks!

  •  1,117
    Qode replied

    Ok Sanna,

    Glad you managed to resolve this issue. 

    If there’s anything else we can help you with, please let us know.

    Best regards,

    Daniel

    The new and improved Online Bridge Documentation is live. Check it out now - LINK

    Also check our articles with useful tips and suggestions

    Best Regards,

    Qode