0

I'm trying to think of the best way of being able to edit a certain custom field on a global basis rather than having to go into each post and editing it.

For example an affiliate link custom field which the link will be different for each post/page. It would be better to be able to add all the links to all the pages/posts via a single screen rather than going into each post and adding a link into the field.

I've tried searching for similar solutions but maybe i'm not using the correct terminology to get the desired results. Any pointers would be highly appreciated .

1

1 Answer 1

1

I would use an option page which would show up in the settings. I used Example #2 from here for a few of my projects.

Then you would use it in your theme like this:

$o = get_option('my_option_name'); // how you named the options from Example #2
$field = $o['field_name']; // how you named the field
echo $field;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.