L
L
Laid2016-03-29 19:23:28
WordPress
Laid, 2016-03-29 19:23:28

How to display the value of one custom field from a specific category?

Good evening,
There is a heading "R" and there is an arbitrary field "P". We need to get the values ​​​​of an
arbitrary field "P" from all posts in the "P" category

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Savitsky, 2016-03-29
@PRC

Here is an example, instead of cost_1, you specify the id of your
Price field: <?php echo get_post_meta( $post_id, 'cost_1', true ); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question