Genesis Page Template With Custom Loop, Custom Fields & Pagination

This page template enables you to display custom field content in a archive type loop which includes pagination. You could do this using a new WP_Query however, you would then need to add the standard genesis markup and hooks back.

The custom page template enables you to retain all the standard functionality the Genesis loop includes to display the content for each custom field. The template is coded to display custom fields for a custom post type named portfolio however you can use it to display content for any other post type.

Here’s a few things you can do with this template:

  • Display posts, page and custom posts types ( or all 3 combined ) within your own custom loop.
  • Use any of the massive range of WP_Query parameters to customize exactly what you display for each entry in the loop and how its displayed.
  • Add, remove or reposition any of the standard hooks included in the standard genesis loop.
  • Execute custom functions to the loop for adding custom field content, images and any Genesis or WordPress functions.

The code is very flexible and easy to modify as seen in the following video.

Video Demo

The video shows you how the 1st template works and displays the custom field value within the content of each entry. The default content added via the wp editor is removed.

The 2nd template shows how you can also retain all the content added via the wp editor and also add custom fields within the loop for each entry.

Coming Soon

There’s 2 templates included in the download:

  1. The template named portfolio-content.php generates the content as well as custom field field content for each entry.
  2. The template named portfolio-no-content.php generates custom field content only for each entry in the loop.

Here’s the download folder for logged in members: