WordPress.org

Support

Support » Plugins and Hacks » SuperCPT » [Resolved] Not able to get SuperCPT too work

[Resolved] Not able to get SuperCPT too work

  • Hi

    I am trying out the SuperCPT plugin but just cannot seem to get it too work.

    I have created a child theme using the canvas framework.

    I added

    add_action('init','test_post_type');
    function test_post_type(){
        if(!class_exists('Super_Custom_Post_Type'))
            return;
        $actors = new Super_Custom_Post_Type( 'actor' );
    }

    I added this in my functions file.
    It does not seem to do anything, what am I doing wrong.

    The superCPT plugin is activated ….

    Thanks

    http://wordpress.org/extend/plugins/super-cpt/

Viewing 15 replies - 1 through 15 (of 24 total)
  • I also created a plugin and activated it but it still does not appear 🙁

    Plugin Author Matthew Boynes

    @mboynes

    Hi Mike,
    Thanks for checking out the plugin! Before we dig into it too far, try one thing for me: instead of init, use after_setup_theme. Let me know if that resolves this for you!

    Cheers,
    Matt

    thanks for getting back to me so quickly 🙂

    I have tried that and still no luck.

    I supposed it is a silly question but having the plugin WCK Fields would not cause any clashes ?

    Plugin Author Matthew Boynes

    @mboynes

    I’m not aware of any plugin compatibility issues, but that is entirely possible. for now, let’s back-burner that and do some recon work.

    After adding that code, when you go to the WordPress admin panel, let’s just confirm that you do not see “Actors” in the left sidebar. Is that correct?

    Next, if you go to /wp-admin/edit.php?post_type=actor, do you get a message that says “Invalid post type”?

    If “Yes” to both, can you please tell me what versions of WordPress and PHP you’re running?

    Thats is a Yes 🙂

    I am running wordress 3.5.1 and canvas is the latest and on my localserver (mamp) I am running 5.3.5

    I also deactivated and remove WCK fields… no clash there 🙂

    Plugin Author Matthew Boynes

    @mboynes

    OK, next up is making sure that that function call is getting hit at all. In your action hook, replace “test_post_type” with “wp_die” and see if that kills your site. If this is a live site, you obviously don’t want to kill it, so we can try something else if that’s the case.

    If that does kill your site, then undo that change and add wp_die(); to the end of your test_post_type() function.

    Let me know what happens with these.

    Yes it does kill the site and gives up a cannot redeclare error message.

    When I added it to the end of the function, nothing happen, site carried on working

    No the site is not live 🙂

    I think I must have misunderstood you 🙁

    I changed both the add_action and the function…. if I just change the add_action, nothing happens

    Plugin Author Matthew Boynes

    @mboynes

    I think you mis-interpreted the first step. It sounds like you replaced function test_post_type() with function wp_die(). Instead, you should have changed the hook to be:

    add_action('after_setup_theme','wp_die');

    Does that indeed kill your site?

    no that does not kill the site

    correction, it does kill the site…bloody typo on the wp_die

    it also kills the site when wp_die is added to the end of the function 🙂

    I just removed the wp_die and it is suddenly working 🙂

    I must have had a typo, which I did check for that was just fixed 🙂

    Many thanks, it is resolved now. I look forward to playing with the plugin 🙂

    Thanks very very much for the help, especially on a friday 🙂

    Plugin Author Matthew Boynes

    @mboynes

    OK Thanks. My last idea is that it’s perhaps a plugin compatibility or a theme compatibility issue. If possible, can you disable all plugins except this one, and try the code in a different theme, like twenty twelve?

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘[Resolved] Not able to get SuperCPT too work’ is closed to new replies.
Skip to toolbar