2016年2月6日 星期六

WordPress Theme Customizer: First Steps

Screenshot 1

I’ve already defined the right way to create a theme choices web page shortly and simply. Making a customized web page for theme choices is perfect if you wish to supply your customers many options. However there’s one other means of realizing a web page for theme choices. For some time now, WordPress has been providing the theme customizer. That is good in case your theme does not supply too many choices. The customizer’s huge benefit is its stay preview. Each change made to the theme may be checked out earlier than you switch it to the web site. This text exhibits you the best way to “feed” the Customizer together with your options.

Creating theme choices with the Theme Customizer is comparatively straightforward and gives its customers the large benefit of a stay preview earlier than saving the modifications. The Theme Customizer acquired launched with WordPress model three.four.

Necessary to Know: No Extra Theme Choices Pages for WordPress.org Themes

Once you need to create a theme for the WordPress.org theme index, you must use the Theme Customizer. Theme options pages are not allowed anymore since the 21st of October of last year.

Creating Theme Choices for the Theme Customizer

ARI Theme

Our instance theme is the Ari theme by Elmastudio. It solely offers the predefined choices and may thus be prolonged properly in the middle of this tutorial. Within the following, we’ll create a completely new Theme Customizer web page for the theme.

Essential: All the following code snippets might be clicked on to obtain the code immediately from GitHub.

The 4 Strategies of the $wp_customize Object

The Predefined Settings

WordPress comes with some default settings that do not must be outlined.

  • title_tagline – Web site Title and Tagline
  • colours – Colours
  • header_image – Header Picture
  • background_image – Background Picture
  • nav – Navigation
  • static_front_page – Static Entrance Web page

The Transport Variations – refresh vs. postMessage

Nevertheless, if you need a few of these options to be seen

The post WordPress Theme Customizer: First Steps appeared first on DICKLEUNG DESIGN 2014.

沒有留言: