Support

Account

Home Forums Backend Issues (wp-admin) show articles with category (food) Reply To: show articles with category (food)

  • ACF fields are tied to individual posts, not categories. If you want to display the fields dynamically without specifying a post ID, simply use:

    php
    Copy
    Edit
    <?php the_field(‘nome’); ?>
    <?php the_field(‘ingredienti’); ?>
    <?php the_field(‘prezzo’); ?>
    This will automatically pull the data from the current post. However, if you need to filter and display fields based on a category, you’ll need to query posts assigned to that category and retrieve their ACF fields. You can apply this to any menu listing or structured content, like on mangmenuprices.ph, where details such as names, ingredients, and prices need to be dynamically managed.