WordPress custom fields

Soldato
Joined
7 Feb 2004
Posts
3,072
I wonder if anyone can help me out. I'm trying to add a custom field to a page on WordPress.
I created a new custom field, when I go to edit the page the cutome field boxes are now there. I fill in the data but when I view the page it doesn't show any of the data.
I then went to duplicate an existing custom field page and changed all the data to my new field.
This works and shows all the data however when I preview the page just above the custom field data I have entered it has a title of the existing custom field that I duplicated from. I can't find anyway way to edit this.

If anyone had any advice that would be great.
Thanks
 
Custom fields won't just appear on the page. You need to add the code to the page template to make it show the field.
Check the documentation for the custom field plugin your using for how to add the fields to the page.
 
What plugin are you using?
The basics of it are that the custom field is nothing more than an input box in the backend. Like has been sad above you need to add php to get it to output into HTML.

I use ACF which outputs using code like this. <?php the_field('example');? >
Put that inside the tags you want to display so H1 etc with the name of the field you created and it outputs the text for you.


// blimey just seen I'm a little late to the party. Lol
 
Back
Top Bottom