Skip to main content

Home/ Wordpress/ Group items tagged development Template webdesign CMS

Rss Feed Group items tagged

Vernon Fowler

Child Themes « WordPress Codex - 0 views

  • A child theme resides in its own directory in wp-content/themes. The scheme below shows the location of a child theme along with its parent theme (Twenty Twelve) in a typical WordPress directory structure:
  • This directory can contain as little as a style.css file, and as much as any full-fledged WordPress theme contains: style.css (required) functions.php (optional) Template files (optional) Other files (optional)
  • @import url("../twentytwelve/style.css");
  • ...4 more annotations...
  • Note on the @import rule There must be no other CSS rules above the @import rule. If you put other rules above it, it will be invalidated and the stylesheet of the parent will not be imported.
  • Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)
  • But, when creating child themes, be aware that using add_theme_support('post-formats') will override the formats as defined by the parent theme, not add to it.
  • A child theme can override any parental template by simply using a file with the same name.
1 - 2 of 2
Showing 20 items per page