Title: Theme reference is everywhere in the generated code
Last modified: November 21, 2018

---

# Theme reference is everywhere in the generated code

 *  Resolved [skiabox](https://wordpress.org/support/users/skiabox/)
 * (@skiabox)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/)
 * Hello guys.
    I am watching a plugin development tutorial and the author is using
   your plugin to generate a couple of custom post types. The problem with my case
   is that I see my theme referenced everywhere in the code in contradiction with
   the tutorial author’s code where the code has no theme references at all. Any
   ideas? Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/#post-10903625)
 * Good day [@skiabox](https://wordpress.org/support/users/skiabox/)
 * I have a hunch they may have recorded the tutorial before we released version
   1.3.0 in early 2016. In that version of the plugin, we added the output of the
   active theme’s textdomain to the labels to help with internationalization. This
   is on the assumption that they’re moving away from using our plugin, and adding
   the registration to their theme instead.
 * Perfectly safe to remove if you are putting the code elsewhere instead of having
   CPTUI handle the registration, but the internationalization help is the intent
   and why we added it.
 *  Thread Starter [skiabox](https://wordpress.org/support/users/skiabox/)
 * (@skiabox)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/#post-10903858)
 * Thank you sir for your rapid answer!
    The assumption you made about tutorial 
   creation time is true. At least the part of the tutorial I am reading now was
   created back in 2015. Sorry for my naive questions but I am new to wordpress 
   plugin development. What do you suggest that I do now since I am using your plugin
   to create another plugin? Remove theme references by hand? Thank you again!
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/#post-10903967)
 * No naive questions here, and I’m happy to help.
 * If you’re for sure not wanting to display the labels and whatnot in multiple 
   languages, then by all means you can. It’s not going to harm anything to leave
   them either, for what it’s worth. Just a case of say changing `__( 'Movies', '
   Customize' )` to `Movies` for the label setup.
 * Also you caused me to ask a good question that we have an open issue for. What
   happens if there’s no textdomain set for a theme? So I have some investigation
   to do there to help make the plugin better.
 *  Thread Starter [skiabox](https://wordpress.org/support/users/skiabox/)
 * (@skiabox)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/#post-10904286)
 * So, if I get it right, I can remove all “twentyseventeen” references inside the
   code (this is my theme) without breaking any functionality?
    If I leave it like
   it is now, with all these twentyseventeen references, can somebody that uses 
   another theme, use the final plugin at the end of the tutorial? Thank you so 
   much for your help!
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/#post-10904598)
 * Just to clarify, the “Get Code” section of the Tools menu, is not what actually
   does the registering for you. It’s more an export feature that types up the basic
   code for you.
 * If you and others are using Custom Post Type UI itself to handle all the registration,
   it doesn’t do anything with textdomains. If you want to just use CPTUI as a generator,
   that’s fine and a handy functionality that we don’t necessarily advertise, but
   it’s at that point where we drop in the textdomain for copy/paste usage.
 * Internationalization/Translation is actually one of our weaker areas that we 
   haven’t found a great solution for, since we store the labels in the database
   and hardcoded.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Theme reference is everywhere in the generated code’ is closed to new
replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/theme-reference-is-everywhere-in-the-generated-code/#post-10904598)
 * Status: resolved