FAQs About Child Theme Configurator for WordPress

We’ve compiled the most frequently asked questions (FAQs) for easy reference. If you have a question that is not covered here please use our contact form and provide as much detail as possible.

Constants Already Defined in PHP Debug Output

When I run the analyzer to create a new child theme, this is the message that I get:

Notice: Constant WP_CRON_LOCK_TIMEOUT already defined in /home/username/public_html/wp-config.php on line 91

Notice: Constant AUTOSAVE_INTERVAL already defined in /home/username/public_html/wp-config.php on line 92

Notice: Constant WP_POST_REVISIONS already defined in /home/username/public_html/wp-config.php on line 93

Notice: Constant EMPTY_TRASH_DAYS already defined in /home/username/public_html/wp-config.php on line 94

First, the CTC analyzer runs in debug mode. This means that it displays PHP debug output that might otherwise go undetected.

Second, we get this question several times a week. These are settings that have been added to the wp-config.php file incorrectly.

At some point, someone put this in the “auto-install” version of WordPress used by your hosting provider. They supposedly help “optimize” wordpress, but do just the opposite when they are implemented incorrectly.

Unless you are running in debug mode, these notices will not affect the front-end, but will continue to be logged until resolved.

To correct this issue, you will need to manually edit wp-config.php (you have to use FTP or your hosting account file manager) and either:

  1. comment out or delete the constant definitions.
  2. move the definition statements so they appear BEFORE the final require statement as shown below:

If moving:

// >>>> SHOULD GO HERE!!! <<<<

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
        define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php’);

// >>>> NOT HERE!!! <<<<

If commenting out:

Locate the lines that begin with “define” that correspond to the error notice, and type “//“ before it, e.g.,

// define( ‘WP_CRON_LOCK_TIMEOUT', 60 );
How Do Child Themes Work?

This tutorial discusses how child themes work and covers important terms and concepts including parent vs child theme, the wp_enqueue_scripts action, and workarounds for common problems.

How do I make my Theme responsive?

The short answer is to use a responsive Parent Theme. Some common methods for responsive design are:

  • Avoiding fixed width and height values. Using max- and min-height values and percentages are ways to make your designs respond to the viewer's browser size.
  • Combining floats and clears with inline and relative positions allow the elements to adjust gracefully to their container's width.
  • Showing and hiding content with Javascript.
Tutorial Videos

How to Customize WordPress with Child Theme Configurator and other FAQsWe've put together a video tutorial that shows how to use Child Theme Configurator to make a fixed-width theme responsive. View Video

How can I know if a theme I am evaluating will work as a child theme?

The best way is to install it, create a child theme with CTC and then use the Live Preview feature under the Appearance menu to test it.

If it is a "premium" theme that you must buy before it can be used, one simple question can save you a lot of time and heartburn:

Do you have any free themes or plugins available on WordPress.org?

Having software hosted on WordPress.org means the vendor will be notified in advance of significant updates that affect the code. WordPress.org is constantly vetting the software it hosts in its repository and kicks out anyone who violates its rules.

It also means you can try out the free version before buying the premium version. If the free theme works, chances are the vendor is aware of common issues and will most likely apply them to their premium software as well.

How does this plugin make the job any easier than simply editing the original theme CSS?

There are many answers to this question. A popular one is that it enables you to find the exact styles in the parent stylesheet to make the changes you want much faster than scouring the code. Another is that changes can be made from one place in the WordPress admin and they can be applied instantly.

Browse the reviews to see how it has helped other users.

According to WordPress.org, over 50,000 WordPress sites actively use the plugin to create and customize child themes.

Will this slow down my site?

Child theme Configurator is designed to add the minimum amount of additional overhead possible and can actually improve performance. For example:

  1. Child Theme Configurator encourages "linking" stylesheets instead of using @import.
  2. Child Theme Configurator is a "code generator." This means it creates or updates files that are already being read by the system. On the front-end, there are no database calls so WordPress can run independent of the plugin. In fact, you can remove Child Theme Configurator when you are finished setting up your theme.
  3. Customizations are applied to a stylesheet file that is cached by the browser and can be minimized and/or cached by a performance caching plugin. Because this stylesheet contains mostly "overrides" to existing styles, it is typically small in comparison to other stylesheets.
  4. The code that drives the admin interface only loads when the tool is being used from the WordPress Admin, including Javascript and CSS. This means that it will not get in the way of other admin pages.
  5. CTC does not "autoload" configuration options. This means that unless you are actively using the tool, your site will not allocate any additional memory resources for options that are not being used.
  6. The biggest performance hit occurs when you generate the Child Theme files from the Parent/Child tab, but this is a one-time event and only occurs from the WordPress Admin.

FAQs

Can I keep using other CSS editing plugins?

Yes, however most CSS plugins store the styles as options in the WordPress database and render them when the page loads, overriding existing theme styles. This means they cannot be parsed into the Child Theme Configurator and you will need to maintain styles in multiple places.

An alternative is to copy any custom styles into the Raw CSS input on the Query/Selector tab and deactivate the other plugins. This way all your styles are in one place where they can be cached by the browser.

Does this work with CSS Hero?

Yes. You use CSS Hero instead of the CTC editor to customize styles for child themes you create with CTC. However, you should be aware of several technical differences:

  • CSS Hero styles will take priority over theme (and child theme) styles, so any changes you make in CTC will be overridden if you also change them in CSS Hero (see the previous question).
  • CSS Hero makes an additional round trip through WordPress to retrieve the stylesheet. Depending on the length of time WordPress takes to respond, this can add a significant delay before the styles are loaded.
  • Currently, CSS Hero does not return a 304 Not Modified header so the browser will reload the stylesheet for every page. Also, because the stylesheet is loaded through WordPress via a GET request query string parameter, advanced cache plugins will not typically cache the response either.
  • By comparison, CTC edits the static stylesheet file, whose modified timestamp will be handled by the web server automatically.
How do I add comments?

Arbitrary comments are not supported. Providing a high level of flexibility for previewing and modifying styles requires sophisticated parsing and data structures. Maintaining comments that bound to any particular element in the stylesheet is prohibitively expensive compared to the value it would add. Although we are working to include this as an option in the future, currently all comments are stripped from the child theme stylesheet code.

If I uninstall Child Theme Configurator are child themes affected?

No. Child Theme Configurator is designed to work independently of themes and plugins. Just remember that if you re-install, you must rebuild the configuration data using the Parent/Child tab.
FAQs

Does it work with Multisite?

You can either go to "Network Admin > Themes > Child Themes" or "Tools > Child Themes" if working in a specific Site. Child themes must be "Network enabled" to preview and activate for Network sites. NOTE: Only users with "install_themes" capability will have access to the Child Theme Configurator. See Working with Multi-site WordPress.
FAQs

HELP! I changed a file and now I am unable to access my website or login to wp-admin to fix it!

To back out of a broken theme you have to manually rename the offending theme directory name (via FTP, SSH or your web host control panel file manager) so that WordPress cannot find it. WordPress will then throw an error and revert back to the default theme (for WP 4.7 this is "Twenty Seventeen").

The child theme is in your themes folder, usually

[path/to/wordpress]/wp-content/themes/[child-theme]

To prevent this in the future, always test your child themes with Live Preview before activating them.FAQs

...or...

Why is my custom header missing when I activate the new child theme?

...or...

Why does my custom background go back to the default when I activate the new child theme?

...or...

Why do my theme options disappear when I activate the new child theme?

These options are specific to each theme and are saved separately in the database. When you create a new child theme, its options are blank.

Many of these options can be copied over to the child theme by checking "Copy Parent Theme Menus, Widgets and other Options" when you generate the child theme files on the Parent/Child tab.

If you want to set different options you can either apply them after you activate the child theme, or by using the "Live Preview" under Appearance > Themes.

  • Menus: Go to Appearance > Menus and click the "Locations" tab. By default, the primary menu will generate the links automatically from the existing pages. Select your customized Menu from the dropdown and click "Use New Menu." This will replace the default menu and you will see the correct links.
  • Header: Go to Appearance > Header. Some themes will show the "Title" and "Tagline" from your "General Settings" by default. Click "Choose Image" and find the header from the Media Library or upload a new image. This will replace default with your custom image.
  • Background: Go to Appearance > Background and choose a new background color or image.
  • Options: Every theme handles options in its own way. Most often, they will create a set of options and store them in the WordPress database. Some options are specific to the active theme (or child theme), and some are specific to the parent theme only (meaning the child theme CANNOT override them). You will have to find out from the theme author which are which.

FAQs

How do I move changes I have already made to a Child Theme?

Things get a lot more complicated when you have already made significant changes to your Parent theme. You will need to move all your modifications into a child theme so that updating the parent does not wipe them out. Follow these steps. FAQs

How do I add Web Fonts?

The easiest method is to paste the @import code provided by Google, Font Squirrel or any other Web Font site into the Web Fonts tab. The fonts will then be available to use as a value of the font-family rule. Be sure you understand the license for any embedded fonts.

You can also create a secondary stylesheet that contains @font-face rules and import it using the Web Fonts tab. FAQs

Does it work with plugins?

Child Theme Configurator Pro extends Child Theme Configurator to let you easily modify styles for any WordPress Plugin installed on your website. Child Theme Configurator Pro scans your plugins and allows you to create custom stylesheets in your Child Theme. Learn more FAQs

Why doesn't this work with my (insert theme vendor here) theme?

In our experience we see the most issues with “premium” themes. Even so, any theme can have issues, and Child Theme Configurator provides ways to work around common problems.

Having helped hundreds of users to get all kinds of themes to work, we have seen over and over again that when there is a problem, it is usually because the theme did not follow basic guidelines.

If you have tried all of the Child Theme Configurator's stylesheet handling options and continue to have trouble making child themes work, download and run the WordPress Theme Check plugin and contact the theme author if it does not pass.

FAQs

Where is it in the Admin?

For most users the Child Theme Configurator can be found under "Tools > Child Themes."

WordPress Multisite (Network) users can also go to "Network Admin > Themes > Child Themes." See Working with Multi-site WordPress.

NOTE: Only users with "install_themes" capability will have access to the Child Theme Configurator.
FAQs

Why doesn't the Parent Theme have any styles when I "View Parent CSS"?

Your Parent theme is probably using a separate location for the stylesheets. Select individual stylesheets from the "Parse Additional Stylesheets" section of the Parent/Child tab and click "Generate Child Theme Files" again. FAQs

Where are the styles? The configurator doesn't show anything!

All of the styles are loaded dynamically. You must start typing in the text boxes to select styles to edit.

"Base" is the query group that contains styles that are not associated with any particular "At-rule."

Start by clicking the "Query/Selector" tab and typing "base" in the first box. You can then start typing in the second box to retrieve the style selectors to edit.

If you see the message "No options available" then your theme is not linking external stylesheets in a way that the Configurator can recognize them. Go to the Parent/Child tab and open the "Parse Additional Stylesheets" panel. There will will find all of the stylesheets used by the theme. Only select the stylesheets you intend to customize, as some may be used by the admin. FAQs

Why do the preview tabs return "Stylesheet could not be displayed"?

You have to load a child theme from the Parent/Child tab for the preview to display. This can also happen when your WP_CONTENT_URL is different than $bloginfo('site_url'). Ajax cannot make cross-domain requests by default. Check that your Settings > General > "WordPress Address (URL)" value is correct. (Often caused by missing "www" in the domain.) FAQs

Can I edit the Child Theme stylesheet manually offline or by using the Editor or do I have to use the Configurator?

You can make any manual changes you wish to the stylesheet. Just make sure you import the revised stylesheet using the Parent/Child panel or the Configurator will overwrite your changes the next time you use it. Just follow the steps as usual but select the "Use Existing Child Theme" radio button as the "Child Theme" option. The Configurator will automatically update its internal data from the new stylesheet. FAQs

If the parent theme changes (e.g., upgrade), do I have to update the child theme?

A child theme automatically inherits its functionality from the parent theme, including any changes from an update.

The point of a child theme is to override specific styles, functions and other aspects of the parent theme and keep them intact when the parent is updated. A child theme is not a “copy” of the parent theme.

If you override substantial blocks of code or entire templates, you may need to manage any pertinent updates manually, but overrides are usually unaffected.

Quality themes should identify any deprecated functions or styles in the upgrade notes so that child theme users can make adjustments accordingly. FAQs

Where are the PHP files?

A child theme uses the parent theme PHP code. The configurator automatically adds a blank functions file (functions.php) to the child theme directory that is loaded before the parent theme functions.

Important: templates are not the same thing as functions. A child theme will automatically inherit the parent theme's templates unless a file with the same name also exists in the child theme directory. See How Child Themes Work for more information.

You can copy parent theme template files using the Files tab, however functions cannot and should not be copied.

If you want to create new templates and directories you will have to create/upload them manually via FTP or SSH.FAQs

How do I change a specific color/font style/background?

You can override a specific value globally using the Rule/Value tab.

How do I add styles that aren't in the Parent Theme?

You can add queries and selectors using the "Raw CSS" textarea on the Query/Selector tab. FAQs

How do I remove a style from the Parent Theme?

You shouldn't really "remove" a style from the Parent. You can, however, set the rule to "inherit," "none," or zero (depending on the rule). This will negate the Parent value. Some experimentation may be necessary. FAQs

How do I remove a style from the Child Theme?

Delete the value from the input for the rule you wish to remove. The Child Theme Configurator only adds overrides for rules that contain values. FAQs

How do I set the !important flag?

We always recommend relying on good cascading design over global overrides. To that end, you have ability to change the load order of child theme styles by entering a value in the "Order" field. And yes, you can now set rules as important by checking the "!" box next to each input. Please use judiciously. FAQs

How do I create cross-browser gradients?

The Child Theme Configurator uses a standardized syntax for gradients and only supports two-color gradients without intermediate stops. The inputs consist of origin (e.g., top, left, 135deg, etc.), start color and end color. The browser-specific syntax is generated automatically when you save these values. See Caveats, for more information. FAQs

How do I recommend a question for these FAQs?

If you have a question that is not covered here please use our contact form and provide as much detail as possible.