Support » Plugin: Custom Post Type UI » Connecting with other plug-in

  • Resolved moniqueoostdam

    (@moniqueoostdam)


    Thank you very much. Your tutorials are handy and very easy to follow. I have a question. I am using the plug-in WP customer reviews. And I would like to add taxonomies to every review post…but it looks like that the two plugins aren’t connected. Do I need to add some php and if yes, what should I add?

    My website is bezinningsvakanties.nl

    Thank you very much,
    Monique

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you’re referring to https://wordpress.org/plugins/wp-customer-reviews/ then it looks like their post type isn’t publicly registered.

    I believe this should get it listed with your UI within CPTUI. By default we only fetch the public ones. It should go in your active theme’s functions.php or any spot where you’re able to add custom code.

    funcion cptui_support_get_non_public_cpts( $args ) {
    $args[‘public’] = false;

    return $args;
    }
    add_filter( ‘cptui_attach_post_types_to_taxonomy’, ‘cptui_support_get_non_public_cpts’ );

    Thread Starter moniqueoostdam

    (@moniqueoostdam)

    Thanks Michael,

    I have added this code to my functions.php, did I do the right thing….the review posts doesn’t show up yet. Or do I need to do something else too?

    I am looking forward to your answer….and thanks by the way for your quick response and help.

    Monique

    function cptui_support_get_non_public_cpts( $args ) {
    $args[‘public’] = false;

    return $args;
    }
    add_filter( ‘cptui_attach_post_types_to_taxonomy’, ‘cptui_support_get_non_public_cpts’ );

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Just so we’re on the same page, the code above should be getting the non-public ones shown in this spot:

    Screen Shot

    From our UI area, but that’s the only thing it’s going to do. If you’re expecting the post types to be showing up somewhere else somehow, then I misunderstood some parts and would need some clarification.

    Thread Starter moniqueoostdam

    (@moniqueoostdam)

    Hi Michael,

    I made a page where I explained myself with printscreens included. https://www.bezinningsvakanties.nl/cpt-ui-and-wp-customer-reviews/

    Thank you very much for your quick response. And for your patience to try to understand me well.

    I am looking forward to your response!

    With thankful greet,
    Monique Oostdam

    p.s.
    The code that I have added is in my message a few days earlier

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Can you confirm that the code snippet above is still in place, and which file it was added to?

    I’m not seeing the Reviews post type listed in the pointed at spot for Printscreen-3 which is where it should be showing up if the filter is working.

    Thread Starter moniqueoostdam

    (@moniqueoostdam)

    I have added this code to my functions.php

    function cptui_support_get_non_public_cpts( $args ) {
    $args[‘public’] = false;

    return $args;
    }
    add_filter( ‘cptui_attach_post_types_to_taxonomy’, ‘cptui_support_get_non_public_cpts’ );

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Is the reviews post type now showing in the “Attach to post types” section of our UI now? Hopefully yes.

    Thread Starter moniqueoostdam

    (@moniqueoostdam)

    Sorry Michael but it doesnt show up.

    Is my PHP code right?

    And if you need to have a look in my website, I can send you my login privatly

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yeah, let’s have you reach out to support@pluginize.com and we can resume debugging this that way. Please link to this forum thread as well so that we can make sure we keep context for the ticket.

    Thanks.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Notes:

    Confirming receiving some private correspondence.

    Looks like you’re using Astra, without a child theme, so I suspect any time you apply updates to it, you’re going to lose the customizations.

    I created and uploaded a quick plugin that has my code above in it. HOWEVER, it also looks like I forgot a detail in that when setting this spot to false, it queries ONLY the non-public post types, and not both like I was originally thinking.

    For example, it’s not listing any of the WP core post types like posts, pages, etc. If that’s okay with you, then you may be good to go. I’m not sure how many taxonomies you’re planning to create. If that’s not okay, then we might not have the solution we need here.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Connecting with other plug-in’ is closed to new replies.