Skip to main content
All CollectionsTroubleshooting and FAQsFrequently Asked QuestionsFilterable Portfolio Module
How to Display the Project Excerpt When Hovering Over Filterable Portfolio Module Items
How to Display the Project Excerpt When Hovering Over Filterable Portfolio Module Items

Learn how to display project excerpt text on hover in the Filterable Portfolio Module to enhance user interaction on your site.

Updated over a week ago

Adding dynamic interactions to your website can significantly enhance user engagement and experience. One effective way to achieve this is by displaying project excerpt text when users hover over items in the Filterable Portfolio Module.

This customization provides additional context and information at a glance, making your portfolio more interactive and informative.

This guide will walk you through the steps to enable hover effects that reveal the project excerpt text in your Filterable Portfolio Module.

Prerequisites:

  1. This customization requires having a Child theme for Divi installed and activated.

  2. Move the Filterable Portfolio module from the parent theme to your child theme folder.

  1. Go to WordPress Dashboard → Appearance → Theme Files Editor

  2. Open the custom-FilterablePortfolio.php from your child theme folder

  3. Find these lines of code:

    if ( '' !== $thumb ) :
    ?>
    <a href="<?php echo esc_url( $permalink ); ?>">
    <span class="et_portfolio_image">
    <?php print_thumbnail( $thumb, $thumbnail['use_timthumb'], $titletext, $width, $height ); ?>
    <?php
    if ( 'on' !== $fullwidth ) {
    echo et_core_esc_previously( $overlay_output ); }
    ?>
    </span>
    </a>
    <?php
    endif;

  4. Replace those lines with:

    if ( '' !== $thumb ) :
    ?>
    <a href="<?php echo esc_url( $permalink ); ?>">
    <span class="et_portfolio_image">
    <?php print_thumbnail( $thumb, $thumbnail['use_timthumb'], $titletext, $width, $height ); ?>
    <?php
    if ( 'on' !== $fullwidth ) {
    echo et_core_esc_previously( $overlay_output ); }
    ?>
    <span class="dt-excerpt"><?php echo get_the_excerpt(); ?></span>
    </span>
    </a>
    <?php
    endif;

  5. For each Project, ensure that the Excerpt text is added by editing each of the Projects in WordPress Dashboard → Projects and filling in the Excerpt field for each project

    WordPress - Set the Project excerpt text

  6. Open the Portfolio module's settings by clicking on the Gear icon

  7. Go to Advanced Tab → Custom CSS → Free Form CSS and add this CSS code:

    selector .dt-excerpt {
    z-index: -1;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    text-align: center;
    padding: 10px;
    }

    selector .et_portfolio_image:hover .dt-excerpt {
    z-index: 3;
    opacity: 1;
    }

    selector .et_overlay::before {
    top: calc(50% + 20px);
    }
  8. (optional) Add styling for the new Excerpt text by opening the Filterable Portfolio module's settings and adding this CSS code to Advanced Tab Custom CSS Free Form CSS

    selector p.project-excerpt {
    color: black;
    padding: 10%;
    text-align: center;
    position: absolute;
    bottom: 25px;
    }

The result can be seen in the screenshot below:

Filterable Portfolio - Show Project excerpt on however
Did this answer your question?