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

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Foodie Pro Archive Page Template With Columns

This template can be used in any genesis child theme. It has been tested on the Foodie Pro child theme by Shay Bocks in response to the following support request by a member of WP Sites:

Thank you for the simple and easily understood directions. I have this mostly implemented, but am not having my categories showing 4 columns; rather its only showing a full-sized featured image with linked title underneath.

Here’s what this 2nd solution produces:

grid-columns

  • The template only displays the featured image and title which you can position before or after the image.
  • You can add a excerpt as well if needed
  • You can also remove the sidebar so the columns display full width of the content sidebar wrap.
  • And you can use the template to display your entries in 2, 3, 4 or 6 columns

Here’s the code you can add to the template to display full width:

//* Force full width content layout
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );

And here’s the full width result:

full-width

Examples of 2, 3 or 6 columns:

And here’s the code you can add to a new file in your child themes root directory. Name the file using the WordPress Template Hierarchy to control which archives its executed on. In this case, category.php.

Download template code for members:

Register for full access

Related Template Code

  • 4 Column Archive Recipes Template – Featured Image & Title Only

CSS Grid Columns Foodie Pro Theme

Reader Interactions

Comments

  1. Rita says

    August 8, 2017 at 7:39 am

    Another question. Would it be hard to take this a step further? That is make it in to a two step solution? First page shows your subcategories. Example Bread, Pasta, Cookies and so on. And when you click on Bread you get the page you have in this tutorial?

    Log in to Reply
    • Brad Dalton says

      August 8, 2017 at 8:29 am

      Can be done yes. Link to a live example please.

      You can use a solution like this to list sub categories and then load a template for sub categories using code like this :

      add_filter( 'category_template', 'load_subcategory_template' );
      function load_subcategory_template( $template ) {
      
      $cat = get_queried_object();
          
      if ( 0 < $cat->category_parent )
          
      $template = locate_template( 'sub-category.php' );
              
          return $template;
      }
      Log in to Reply
      • Rita says

        August 8, 2017 at 12:05 pm

        I only have link to swedish cites but here is an example of what I mean.
        http://www.leila.se/leilas-recept/index1,5.htm

        Log in to Reply
        • Brad Dalton says

          August 8, 2017 at 12:08 pm

          Ok, see my previous answer which provides the code and link to several templates you can use.

          Log in to Reply
          • Rita says

            August 8, 2017 at 2:06 pm

            Thank’s

  2. Rita says

    July 28, 2017 at 2:59 pm

    This one was very nice. Would it be possible to set a number of how many post to show directly in the code? I know that as it is now it follows the number i write in settings, but it would be nice to set a larger number on a page like this.

    Log in to Reply
    • Brad Dalton says

      July 28, 2017 at 9:22 pm

      Hi Rita, yes, you can use code like this in functions with the correct conditional tag to target your template.

      add_action('pre_get_posts','loop_filter');
      function loop_filter($query) {
      
      if ( ! is_admin() &#038;& $query->is_main_query() &#038;& is_category() ) {
      
           $query->set( 'orderby', 'date' );
           $query->set( 'order', 'ASC' );
            $query->set( 'posts_per_page', 3 );
        }
      }
      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.