Convert Category Archives To Portfolio Style Archive Pages In Balance Theme

If you have already read my post about how to add multiple portfolio style category archive pages using the Crystal child theme, you’ll love this post. The reason you’ll like it is because its far easier to do using the Balance child theme than using Crystal.

That really does show you the way Copybloggers StudioPress are improving their range of themes as they only get better and easier to customize.

In this post, i’ll provide you with all the code i have edited and tested which has all been modified using existing code included in the balance theme files.

Here’s the result to provide this method works, and works well.

Note: Its best to crop or resize your featured images for your portfolio thumbnails so they are all exactly the same size when displayed in your portfolio style category archive pages.

Please click the Gist link and copy the code from the view raw link to paste into 3 separate files.

Code

  • The functions.php code goes at the end of your child themes functions.php file
  • The page_catarc.php code gets pasted into a new PHP file and added in the root directory of your child theme folder.
  • The style.css code goes at the end of your child themes style.css file.
Note: Please resave your permalinks. The structure used for the portfolio posts is postname.

permalink settings

Portfolio Images

The first portfolio category archive is named portfolio and the second one is catarc.

portfolio category archive

Rinse & Repeat

multiple portfolio category archives

This method works beautifully and makes it easy to convert all your category pages to a more visually appealing way of displaying different posts in all your categories.

Other Themes

Note: You can apply this method to any theme built on the Genesis theme framework, endorsed by the founder of WordPress, Matt Mullenweg.

Comments

6 responses to “Convert Category Archives To Portfolio Style Archive Pages In Balance Theme”

  1. Hi Brad,

    Thanks for this tutorial. I got everything to work the first time when I used the code you provided. But when I went to do this again to create additional category pages I keep getting this error message: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘lifestyle_photography_widget’ not found or invalid function name in /home/laceandl/public_html/wp/wp-includes/plugin.php on line 429

    Are there specific things I should do differently to create more of these? I just followed your instructions again and replaced ‘catarc’ with the name of a category that I wanted to use from the site.

    Any thoughts are helpful. Thanks!

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Cara

      There’s generally different ways to get the same result.

      This works well on some themes under specific circumstances.

      The error is caused because you have changed the function name which needs to match the 2nd parameter ($function_to_add) in the action hook. http://codex.wordpress.org/Function_Reference/add_action

      [code]
      add_action( ‘genesis_loop’, ‘lifestyle_photography_widget’ );
      function lifestyle_photography_widget() {
      [/code]

      I would use a different method if you want archive pages to display in a grid when your theme includes a portfolio CPT.

      1. Thanks for your thoughts. If I switched to a theme that had genesis portfolio already installed would it work better?

        1. Brad Dalton Avatar
          Brad Dalton

          You could test it out on Executive Pro or add the code from Executive Pro to any theme.

          Another option is to use CSS which you can use on any archive on any theme. http://wpsites.net/web-design/archive-page-grid-style-columns-using-css/

  2. Stephanie Avatar

    HI Brad,

    Thanks for the code, this is exactly what I’ve been looking for, only I’m a novice and I’ve hit a snag. I followed all the instructions but I can’t figure out how to add the catarc page from my WordPress dashboard. I’ve looked under widgets and page templates and it’s not there. And should the new php file show up in the editor?

    Thanks!

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Stephanie

      It will be under Page Attributes as long as you have uploaded the template file to your child themes root directory.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.