• 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

Use Custom Fields Outside The Content Area & Loop On Archives

This code enables you to use custom fields including ACF fields outside the loop in any archive page type template. You can also display the content from a custom Wysiwyg Editor added to your archive template in any hook position outside the content area and loop.

In this example, the contents from the custom Wysiwyg Editor is printed after the pagination on the archive page :

Custom Field After Loop Archive Page

You can use this code to display any type of content from any type of WordPress or plugin specific ( like ACF ) custom fields in any WordPress or Genesis hook position outside the loop on any archive page type.

Demo Video #

Shows the ACF Wysiwyg Editor content displaying after the loop using the genesis_after_loop hook on the category archive page.

Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme using Genesis, WordPress or plugin specific fields including ACF get_field and the_field.

Installation Steps #

There’s 2 steps :

Step 1 – Upload the file named archive.php to your child theme folder.

Step 2 – Name the file according to the WordPress Template Hierarchy so it loads on the archive pages you are targeting with custom field content. Or, you can take the code snippet and use it in your functions file with a conditional tag.

Download Folder

Related Code Snippets

  • How to add text to the bottom of category and tag archive pages

Custom Fields Taxonomy Terms

Reader Interactions

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.