• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Changing Number Of Portfolio Archive Columns & Fixing Gap Between Featured Images

If you add a portfolio page to your StudioPress theme and can’t work out why it doesn’t display correctly, here’s one fix which may solve the problem.

Firstly, here’s a common problem which happens when changing the number of featured image columns you want displayed inline.

featured images

All you need to do to fix the problem which causes a gap, is modify this line of CSS code:

.cpt-portfolio .portfolio:nth-of-type(6n+1) {
                clear: left;
}

Simply change the 6 to the same number of columns you want to display which is 4 in this case:

.cpt-portfolio .portfolio:nth-of-type(4n+1) {
                clear: left;
}

And here’s what your portfolio archive now looks like:

portfolio archive

Learn more about the nth-of-type pseudo-class.

Related Tips

  • Change Home Top Featured Page Widgets From 3 To 4 In Executive Pro Theme

Reader Interactions

Comments

  1. howard harvey says

    December 5, 2013 at 5:24 pm

    Your time is perfect. I have run into this problem this week and will try this solution today. On a different note, you like big surf so do I but unfortunately I broke my knee twenty years ago and all I can do now is Pipo board. I live in Lompoc a small town in the central coast of CA.

    Thanks again

    Log in to Reply
    • Brad Dalton says

      December 5, 2013 at 5:49 pm

      Hello Howard.

      Its a simple solution but one that i knew would come in handy for people who have added a portfolio page and changed the number of columns for featured images.

      Haven’t been for a surf for a while and starting to get really unfit so should get back into it.

      I like body body surfing and started when i was in single digits!! hahaha.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.