Archived topic
Page Header Template Tags
5 replies · Started by Jordan on April 16, 2018
Hi,
I'm trying to get some custom fields (for example one field is 'owner') associated with the custom post type "bikes" to show up in the page header. I've tried using {{custom_field.owner}} but it doesn't seem to be working for me.
The CPT and Fields are created using WP-Types. Do the Page Header Templates only work for standard posts with custom fields? BTW, if I type in {{custom_field._thumbnail_id}} it does print the featured image of the CPT in the header so it is working for that but not for any of the custom fields.
I'm attaching screenshots that may help figure out the issue. https://img42.com/@KMnNY
As long as the name matches the name of the custom field, it should work.
Your screenshot didn't seem to work.
Let me know :)
Ok name matches field name but it doesn't seem to be working....
Trying screenshots again here:
https://ibb.co/ngkPcS
https://ibb.co/mBfqHS
https://ibb.co/ju5PcS
What if you use a capital "O" in "Owner"?
I'm not sure how WP-Types register their meta. Perhaps there's an underscore before the name? _Owner
Ok, thanks. So it turns out all WP-Types fields are preceded by "wpcf-"
I added this {{custom_field.wpcf-owner}} and it now works! Thanks
Awesome! No problem :)