Answer the question
In order to leave comments, you need to log in
How to display the value of a custom WordPress category field?
Hello. I found the only article with a working method for adding custom fields for headings, I did everything, but now I don’t know how to display the value of this field for the heading.
Here is a link to the article.
Tell me good people.
Answer the question
In order to leave comments, you need to log in
<?php $key_1_value = get_post_meta(76, 'field_name', true); ?>
where: fiel_name is the name of the custom field, 76 is the id of the post from which you want to pull the value
wp-kama.ru/function/get_post_meta
there are a lot of details
MB is worth waiting for WP 4.4 will be released towards the end of the month. There, these metafields will already be built into the kernel. It will be possible to add and receive the usual functions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question