Support

Account

Forum Replies Created

  • I tried using a taxonomy field from ACF, but it wasn’t picking up my taxonomy as an option from the Custom Post Type that this post is. Is there a way to get taxonomies from Custom Post Types?

    Also, if I’m understanding your suggestion correctly, I’d have to add the tags twice: to the full list field, and to the publicly-displayed field. I was hoping to avoid that redundancy by having the ACF field reference the list of tags already assigned to the post.

  • Yep — that’s exactly right.

    Displaying the data isn’t really a concern, though — I can figure that out. Do you have any recommendations on the best way for me to save which boxes the admin has checked/unchecked?

  • Yep — I mean the normal WP tags taxonomy. Here’s how it looks within the admin:

    https://cl.ly/2F0f0k2U3m42

    You can see the normal tag list on the top, then my component with checkboxes below. You’ll see that I unchecked “Plants 101” and “Relaxation Line”, so that (once it’s working) those wouldn’t be displayed on the front end.

    I’m just not sure how to save that because those tags are being generated automatically using the following code:

    $post_id = $_GET['post'];
    $tags = wp_get_post_tags($post_id);
    foreach($tags as $tag) {
        echo '<input type="checkbox" name="ppjtags_'. $tag->term_id .'" checked>'. $tag->name .'<br>';
    }

    Does that help clarify things?

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