WordPress.org

Forums

Custom Post Type UI
[resolved] Parse Error on Get Code (6 posts)

  1. kylerb
    Member
    Posted 1 year ago #

    Hello,

    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.

    Thanks!

    http://wordpress.org/plugins/custom-post-type-ui/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. kylerb
    Member
    Posted 1 year ago #

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

  4. Troy Templeman
    Member
    Posted 1 year ago #

    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?

    Thanks!

  5. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    https://github.com/WebDevStudios/custom-post-type-ui

  6. Troy Templeman
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic