• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

nth-of-type CSS on Agency Pro Featured Posts

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › nth-of-type CSS on Agency Pro Featured Posts

This topic is: resolved

Tagged: 3n+1, agency pro, featured posts widget, genesis

  • This topic has 8 replies, 3 voices, and was last updated 11 years, 4 months ago by staplechasers.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • March 22, 2014 at 9:41 am #96072
    chamster
    Member

    I'm trying to achieve a row of 4 articles using the Genesis Featured Posts widget in the Home Middle widget area of Agency Pro theme. Here's the page: http://localhost/garthstein.com/2014/website/.

    I've adjusted the sizes of the divs and images, but I can't find where the css gets generated to cause a new row after the third article.

    The article elements have the following css:

    .agency-pro-home .featuredpost .entry {
    float: left;
    }

    But the fourth article (and the first) have the following css:

    .home-middle .featuredpost .post:nth-of-type(3n+1) {
    clear: left;
    }

    This causes those to be displayed below the preceding articles, effectively creating a new row. I get that. I see how and why it works. What I can't figure out is where the nth-of-type(3n+1) gets assigned to those articles. If I could find that code , it seems I could change it to 4n+1 and get 4 articles in a row instead of 3.

    Anybody have any ideas? Thanks!!

    March 22, 2014 at 4:09 pm #96099
    Brad Dalton
    Participant

    Line 1268 which you can find using the search feature in Notepad++


    Tutorials for StudioPress Themes.

    March 22, 2014 at 4:37 pm #96105
    Brad Dalton
    Participant

    Actually, you don't need to do that unless you want to change the home-bottom.

    For the home-middle widgets, you can simply change the width to 25%

    .agency-pro-home .featuredpost .entry {
    	background: none;
    	float: left;
    	width: 25%;
    }
    

    And change the featured image size in your functions to 285px width

    add_image_size( 'home-middle', 285, 285, TRUE );
    

    Then change the height for the background in CSS


    Tutorials for StudioPress Themes.

    March 22, 2014 at 11:17 pm #96128
    chamster
    Member

    Line 1268 in which file?

    I'm on a Mac, so I can't use Notepad++

    March 22, 2014 at 11:19 pm #96129
    chamster
    Member

    I've already done that css with the 25% etc. Made things look right, as far as sizes of boxes go, but still 3 columns, which is why I'm convinced that the nth-of-type(3n+1) is the key to solving that problem.

    March 23, 2014 at 9:01 am #96173
    chamster
    Member

    Okay I found the 3n+1 code in style.css of Agency Pro theme. I don't know how I missed it. I searched that file so many times, even doing a "find" on the number 3 and on +, etc. So I'm baffled at how I didn't find it, but hopefully my wasted hours and brddalton's responses above will prevent someone from wasting as much time in the future.

    At any rate, I changed 3n+1 to 4n+1 and that's it, done. Simple as that, and as simple as I knew it had to be.

    March 23, 2014 at 11:39 am #96197
    Brad Dalton
    Participant

    Here's how i did it http://wpsites.net/web-design/increase-agency-pro-themes-home-middle-widgets-from-3-to-4-columns/


    Tutorials for StudioPress Themes.

    March 23, 2014 at 11:46 am #96202
    Brad Dalton
    Participant

    My concern was that the 3n will change the home bottom widgets as well.


    Tutorials for StudioPress Themes.

    July 28, 2014 at 7:47 am #116059
    staplechasers
    Member

    Thanks guys worked like a charm!!

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble