Site logo

Archived topic

name of custom field shown on BLOG startpage

3 replies · Started by Thomas on October 14, 2020

Viewing posts 1–4 of 4

Hi,

I am using a custom field in WordPress.
The field is named "Headertext".

In GP's page header (GP Premium) I am using this custom field like this:
<h1>{{custom_field.Headertext}}</h1>

Static pages show the right content, just as entered in the page's custom fields.
And if there is no content for one of the pages, the header show no text at all (OK).

Problem:
The BLOG startpage shows the fieldname itself in the header:
{{custom_field.Headertext}}

What am I doing wrong?

Thank you for your Support, TC

Hi there,

I'm assuming that WordPress ignores custom field value on the blog page just like it ignores the metabox values.

In this case, you would need to create a separate header element for the blog page with manual text like this:
<h1>This is the title for the blog page</h1>

And set the display rule to the blog page only.

Also make sure to exclude the blog page from the other header element.

Hi Leo,

thank you very much, that works :-)

Best regards, TC

No problem :)

This archived topic is closed to new replies.