• Resolved Aaron Forgue

    (@forgueam)


    if ( 'post' == $post_type || wpcp_woocommerce_support() && wpcp_is_pro() ) {
    	wp_enqueue_script( 'wp-category-permalink.js', plugins_url('/wp-category-permalink.js', __FILE__), array( 'jquery' ), '1.6', false );
    }

    Is there a particular reason for only loading the JS if the post_type is “post”? This line is breaking the plugin for my custom post types.

    https://www.ads-software.com/plugins/wp-category-permalink/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    You can try but the plugin will not work with custom post types unfortunately. Still waiting for the API to support this.

    Thread Starter Aaron Forgue

    (@forgueam)

    What specifically is not supported by the API? I’d like to look into to it to be sure.

    Thanks for your help!

    Plugin Author Jordy Meow

    (@tigroumeow)

    It required a lot of hacking to make it work basically, but WordPress could make this task much easier. Let me discuss with Yaniv (the other developer), he actually added code to support WooCommerce products and basically those are custom post types too.

    Hi Aaron,

    What kind of a custom post was working for you before?

    Thanks,
    Yaniv

    Thread Starter Aaron Forgue

    (@forgueam)

    Just a normal custom post type that I created in one of our own plugins. Wasn’t anything related to WooCommerce.

    Just short-circuiting that condition that I listed above fixed the issue we were having in the admin area (although I don’t like having to modify core plugin code, which is why I started this discussion to begin with).

    Essentially, the only issue we had was that the “Set permalink” hover link wasn’t showing up in the admin area because the JS was enqueued and loaded.

    Let me know what specific details you’d like to know. I’m happy to help.

    Another vote for custom post type compatibility here ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Post Types’ is closed to new replies.