WP SITES

2952 Tutorials & 191 Plugins

Custom Portfolio Template With Hover Effects Using Genesis Featured Posts Widget

This post includes all the code which creates a custom portfolio style template that works on the Genesis theme framework.

The code creates a widget area which you simply populate with the Genesis featured posts widget and configure the widget settings to your own liking.

When you hover over the featured images, the title and excerpt appear with a transparent background. The effect is the same as what the StudioPress Agency Pro themes front page displays for the home middle widget area.

The code has been taken from this theme and modified to work with a custom page template i have created.

Here’s an example which also includes a background image using Backstretch(optional):

background hover effects

Check out the full page screen shot example at the end of this post.

Create The Page Template


And here’s the mobile View @630 px width which looks pretty slick in my opinion.

ipad mobile responsive

Here’s the mobile View @267 px width.

iphone mobile responsive view

Note: The background will display the full length of the post when viewed on any size screen. The reason it doesn’t in these screenshots is because it uses Javascript which doesn’t work when using a screenshot app like Awesome screenshot.

Setup

Once you’ve added all the code, you can simply follow the setup details for the Agency Pro themes Background and Middle home widgets which you can access from the Download area in my studioPress.

Go to My StudioPress > Downloads > Agency Pro > Theme Setup.

Agency Pro Theme Setup

Don’t Own Genesis or The Agency Pro Theme?

Returning customers get 25% off all StudioPress themes.

33 responses to “Custom Portfolio Template With Hover Effects Using Genesis Featured Posts Widget”

  1. exelexys Avatar
    exelexys

    Great work. Functions beautifully.

    Not to be nitpicky but there’s a duplicate CSS selector for the media query 800px you may want to remove:
    [code]
    .featured-widgets .featuredpost .entry {
    min-height: 320px;
    }
    [/code]
    Question:

    When clicking on one of the squares, instead of navigating to a post, what would be required to display a popup image gallery? Any idea how to achieve this?

    Thanks in advance

    1. Brad Dalton Avatar
      Brad Dalton

      The 2 classes in that rule are different.

      One is a custom body class added to the template and the other is for the featured posts widget.

      To display a gallery, you would need to add a fair amount of custom code.

      1. exelexys Avatar
        exelexys

        Understood. Though it shouldn’t matter, the last rule seems to have been added twice:

        @media only screen and (max-width: 800px) {

        .wpsites-featured-widgets .wrap {
        max-width: 640px;
        }
        .featured-widgets .featuredpost .entry {
        min-height: 320px;
        }
        .featured-widgets .featuredpost .entry {
        min-height: 320px;
        }

        1. Brad Dalton Avatar
          Brad Dalton

          Yes, you are right. Updated now. Thanks for the pickup.

          1. exelexys Avatar
            exelexys

            No worries. Any idea how to approach integrating a lightbox gallery with these featured posts blocks?

          2. Brad Dalton Avatar
            Brad Dalton

            I would look for another theme which includes this feature and inspect the code.

            There’s are many plugins which also include this effect for images like Jetpack.

          3. exelexys Avatar
            exelexys

            Will do. Have found lots of lightbox plugins but haven’t found one with hover effects that display text like these featured post blocks do. =(

          4. Brad Dalton Avatar
            Brad Dalton

            Me either. Its a good question and something i should write about once i have a good solution.

  2. “Try the Genesis Featured Widget Amplified plugin http://wordpress.org/plugins/genesis-featured-widget-amplified/

    I’m using the above plugin. The only part I’m struggling with is adding post details over the image when a user hovers.

    Thanks,

    Simon

    1. Brad Dalton Avatar
      Brad Dalton

      Never suggested you use that plugin for adding hover effects as its not needed.

      You may need to use different classes as that plugin may not use the same classes as the Genesis Featured Posts widget.

  3. Hi again,

    Where can i change to post taxonomy?

    many thanks,

    Simon

    1. Brad Dalton Avatar
      Brad Dalton

      Sorry but your question does not make sense. Please clarify.

      1. Thanks for getting back to me so quickly.

        I created custom post types for portfolio items. I wish to display these on the homepage in a a widget along with other widgets as opposed to a custom page. Could you point me in the right direction to achieve this. I really like the hover layout that you have emulated from Agency Pro

        1. Brad Dalton Avatar
          Brad Dalton

          Try the Genesis Featured Widget Amplified plugin http://wordpress.org/plugins/genesis-featured-widget-amplified/

          1. Dear Brad,

            I have the same question as Simon. I would like to use the Featured Post widget for my pages, in the same setup. On the homepage middle section of my Agency Pro theme.

            The genesis-featured-widget-amplified seems to be bugged because i cant select the page option.

            What to do?

            thank you,

            Mark

          2. Brad Dalton Avatar
            Brad Dalton

            You use the Genesis Featured Pages widget however you will need to modify the classes in the CSS code as they are different for featured posts than featured pages.

          3. Hi Brad,

            I used the plugin you suggested. It would be great if you were thinking of a tutorial if you could show us how to do the hover effect. I’m butchering the code at the moment and i cant get the grid to play nice of display the post name over the image as per the Agency style grid.

            thanks,

            Simon

          4. Brad Dalton Avatar
            Brad Dalton

            Which plugin Simon?

            I didn’t suggest using a plugin for this as its not needed.

  4. Hi, great tutorial. Might be a stupid question but does “featured_widgets.php” create a new page or is it used for the widget area. So my question is do I need to have a custom homepage for this to work?

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Simon

      It creates a new page template which you can select from the Page Attributes on any page.

  5. Josh White Avatar
    Josh White

    I’ve been going crazy for days trying how to figure out how to add a portfolio page to agency pro that is similar to the home middle widget. This saved me so much time and frustration, works perfectly. YOU ARE AWESOME!!

  6. Wow. You are so good.

    I was already using the Agency Pro theme and wanted to use the Featured Post widget on another page. Once I followed your instructions accurately, it worked like a charm.

    So, to others who use this, it works on the Agency Pro theme, including mobile too !

    Thank you !

    1. Brad Dalton Avatar
      Brad Dalton

      Thanks Roy.

      Wasn’t having a great day and you made me feel better! hahaha

  7. Andrea Arden Avatar
    Andrea Arden

    Brad, thank you very much for consistently posting such helpful content on your site. Every day, I look forward to seeing what great topic you’ve chosen to write about. I’m often delighted to find that it’s something I was just thinking I wanted to know!

    is there a way to have the images in this grid link to external sites instead of internal posts?

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Andrea

      Thanks for the kind words.

      I don’t think there is an easy way to do that.

      I know you can do it when using the native WordPress gallery but not easily done when using the Genesis featured posts widget.

    2. Brian Dusablon Avatar
      Brian Dusablon

      You could use a redirect plugin and redirect the post to the external site.

    3. Brad Dalton Avatar
      Brad Dalton

      Brian suggested using a redirect plugin which you could try.

      If you want to redirect, you can use the built in redirect option included in the Genesis SEO settings or you could use a small PHP code snippet for redirecting but it won’t be dynamic as your posts will change.

      The ultimate solution is to modify the plugin.

      1. Jodi Stammer Avatar
        Jodi Stammer

        I think you could use the Genesis Featured Widget Amplified plugin, then set a custom field with a link. But I suppose that would link all featured posts to the same custom URL. I haven’t tried it, but here’s some info …

        http://wordpress.org/support/topic/plugin-genesis-featured-widget-amplified-custom-link-to-imagepost-title-does-not-seem-to-function?replies=6

  8. Michael Angelo Worthen Avatar
    Michael Angelo Worthen

    I just wanted to say thank you for your great posts, Brad! I’m a big fan. I’m looking forward to utilizing this one very soon. ๐Ÿ™‚

    1. Brad Dalton Avatar
      Brad Dalton

      Thanks Michael. Sorry for the late reply.

Was This Tutorial Helpful?