Support

Account

Home Forums Backend Issues (wp-admin) Exclude post_tag for checkbox

Solved

Exclude post_tag for checkbox

  • Hi

    How can I exclude post_tag (terms) using custom field Taxonomy? (backend)

    The checkbox list of all of the terms. I need only some terms (exclude the rest).

  • I solved the problem. The solution:

    Create a file ‘nextli.js’:

    jQuery(document).ready(function(){
        jQuery('.acf-taxonomy-field .acf-checkbox-list li:nth-child(3)').nextAll().css('display','none');
    });

    In function.php

    function admin_inline_js(){
            wp_enqueue_script('custom_admin_script',  get_stylesheet_directory_uri().'/lib/nextall.js', array('jquery'));
        }  
        
    add_action( 'admin_enqueue_scripts', 'admin_inline_js' );
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Exclude post_tag for checkbox’ is closed to new replies.