Support » Plugin: Custom Post Type UI » Parse Error on Get Code

  • Resolved kylerb



    First I want to say thanks for this amazing plugin.

    I’m still kind of a newbie when it comes to PHP and very new when it comes to custom post types, so I apologize if I’m doing something wrong. When I create my custom post type and copy and paste the code under “Get Code” into my functions.php file I get an error that looks like this:
    Parse error: syntax error, unexpected T_STRING, expecting ‘)’ functions.php

    I thought it have been my theme, but then I tried the Twenty Twelve them as well and had the same issue.


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


    Yeah, this is an issue with the get code that should be fixed once I can push out version 8.1.

    However, you don’t need to use the Get Code bit if you’re wanting to get some CPTs registered. The plugin does that for you and adds them to your menu. The Get Code is just for if you want to move away from the plugin but keep the CPT settings. No need if you just keep the plugin activated.

    Oh ok, that’s exactly what I was trying to do. Many thanks!

    Hi Michael,

    Is there a way around this until you release the next version? The reason I’m using the code instead is because I wanted to take the code that the plugin generated and add ‘show_admin_column’ => true to it in order to display taxonomy columns on custom post type pages. This doesn’t seem to be a feature in the current version of your plugin (unless I’m missing something).

    Is there some way of fixing the generated code in order for it to work?


    Plugin Author Michael Beckwith


    Troy, if you want, you can download what *will* be 0.8.1 on the master branch at GitHub. It has the get code stuff fixed as well as, if I recall right, the show_admin_column option as well. Otherwise, there isn’t any sort of “quick fix” to the get code other than just correcting the single quote balance and I believe some commas in places that don’t need it.

    Thanks Michael, The new version works like a charm. I can add taxonomy columns with the plugin and the code it generates works by itself too. Great plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Parse Error on Get Code’ is closed to new replies.