Support

Account

Forum Replies Created

  • 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.

  • You can achieve this using WP_Query to fetch all “Galleries” posts and retrieve images from the ACF gallery field. Try this:

    php
    Copy
    Edit
    <?php
    $query = new WP_Query([‘post_type’ => ‘galleries’, ‘posts_per_page’ => -1]);
    if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();
    $images = get_field(‘gallery’);
    if ($images) : foreach ($images as $image) :
    echo ‘' . esc_attr($image['alt']) . '‘;
    endforeach; endif;
    endwhile; wp_reset_postdata(); endif;
    ?>
    I used a similar approach on Photoapkleap site to handle image content. Hope this helps!

  • If you’re handling uploads outside the WordPress media library, you can try using CSS or JavaScript to disable the edit functionality. A simple CSS trick would be:

    .your-thumbnail-class { pointer-events: none; }

    This will prevent clicks on the thumbnail. If it’s handled via JavaScript, you might need to override the click event. Let me know if you need help tweaking it!

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