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

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.