Archived topic
Adding content to blog / archives
5 replies · Started by Ben on May 18, 2020
What is the best way to add introductory text (editable) to top of blog listing (archives). Ideally I'd like to have a page that can have the content editable at the top and then display the blog archive below (using the GP theme blog column settings). I'd also like to find a method that will allow me to do this with other post types (not just blog posts).
Many thanks
Ben
Hi there,
You could use the Hook or Header Elements:
Thanks, but Hooks/headers arent easy for editors to edit.
I was more thinking of trying to add something to the archive.php template via child theme and add this somewhere:
the_content(); // this will output the page content
with the aim of adding the page content, prior to displaying the archive list
is something like that possible?
Unfortunately its a little more complicated then adding the_content() to a custom template.
Perhaps look at Advanced Custom Fields combined with the GP Hooks?
ok thanks, will give it a go. Currently looking at using ACP to insert text via Header Element. Many thanks
Awesome - just a note the Header Element will accept HTML and Shortcodes but it won't accept PHP. The {{custom_field.name}} template tag should work with ACF fields also..