Support

Account

Home Forums Front-end Issues how to show custom fields on another page

Solved

how to show custom fields on another page

  • Hi,

    Thanks in Advance.
    i have a problem with custom fields. i want to show the custom fields of Category on other pages by category id. but i cam unable to show the custom fields of category on anohter pages.

    i tried the method “term_category_id”, “category_id” etc but that not working. please give me any query example if i can directly get from db or any other method.

    thanks
    Dinesh

  • <?php $post = get_post(page_id); ?><?php the_field(‘field_name’); ?>

  • i need to use the category id. is this work?

  • 
    get_field('FILED NAME', "term_{$TERM_ID}");
    
  • Thanks for your support. i solved my issue yesterday by using the shortcode. i don’t why the above code not working. so i use the shortcode. that will solve my problem.
    Example: [acf field="field_name" post_id="123"]
    used code : [acf field="field_name" post_id="term_123"]
    or get_field(‘FILED NAME’, “term_{$TERM_ID}”); (don’t know why it not working for me but its code for getting.)
    Thanks all John Huebner, imanish and acf support team.

    Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.