• Resolved keendev

    (@keendev)


    Hi,

    I have a custom taxonomy, and it seems as though this plugin is preventing me from seeing all of my items inside the edit custom post type page. E.g. when i disable this plugin i can see all taxonomy terms correctly.

    I went into the code found (Line 39):
    if ( $post_type == false || $post_type == 'post' )

    and replaced it with:

    if ($post_type == 'post' )

    I can now see my custom taxonomy terms on the edit custom post type item page. Is there a reason for this?

    Thanks

    https://www.ads-software.com/extend/plugins/restrict-categories/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter keendev

    (@keendev)

    However this has disabled it sitewide. Upon further investigation.

    Now if is visit:

    post-new.php

    it will not run the plugin at all, since post_type is not set. Though if i do:

    post-new.php?post_type=post, it works as expected and blogs out categories.

    I tried to get it to check if the currently edited post is a post type other then ‘post’ however the global $post variable is not available at init.

    So it seems as though the issue stands on post-new.php & for custom taxonomies.

    Regards

    Thread Starter keendev

    (@keendev)

    Hi guys,

    I have seemed to fix the issue please do the following and let me know if it works for you.

    I believe the issue stems from the following:

    If you delete a category it remains in the cached options of categories a user can post to. Now since Restrict Categories will loop through all these categories and try find the ID a deleted category will return no id cause the query to mess up. This could be something inside 3.5 causing the issue.

    So do the following:

    Find:
    $this->cat_list .= $term_id . ‘,’;

    Above Add:
    if ( !empty( $term_id ) )

    You will need to perform this twice. The lines associated with these edits is 461 and 484.

    Please let me know what happens ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Taxonomies not loading due to plugin’ is closed to new replies.