Viewing 1 replies (of 1 total)
  • I was able to make the plugin apply to a specific post type by editing the code. The plugin looks for an id to check if anything is checked. I just changed the id and it made the user select a Taxonomy term from only that custom post type.

    What I did was find the div containing my custom post type taxonomy terms when viewing the post in the dashboard. In the source code it looked like this:

    <div class=”inside”>
    <div id=”taxonomy-resourcetype” class=”categorydiv”>

    In the plugin code (force-post-category-selection.php) there were two lines that I changed.

    This line: var cats = jQuery(‘[id^=\”taxonomy\”]’)
    I changed to: var cats = jQuery(‘[id^=\”taxonomy-resourcetype\”]’)

    and near the end of the code I changed:
    jQuery(‘[id^=\”taxonomy\”]’).find(‘.tabs-panel’).css(‘background’, ‘#F96’);

    to

    jQuery(‘[id^=\”taxonomy-resourcetype\”]’).find(‘.tabs-panel’).css(‘background’, ‘#F96’);

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Apply this plugin on specific post_type’ is closed to new replies.