custom-background callback breaks media uploader

Long shot, but if you happen to not follow the recommended format and include the number sign with the HEX code when you define the default colour in your theme support, like this: if (function_exists(‘add_theme_support’)) { $defaults = array(‘default-color’ => ‘#666’); add_theme_support( ‘custom-background’, $defaults ); } Then, with your code above, you will end up … Read more

How do I change theme demo [duplicate]

You will need to set the homepage through the settings. As stated in this answer: Go to Dashboard -> Settings -> Reading Change Front page displays from Your latest posts to A static page In the dropdown beneath this option, select the static Page to use as your Front Page. If you want to display … Read more

Serving a custom featured image for mobile

I would do this with Advanced Custom Fields and a Sass mixin: @mixin image-2x($image, $width, $height) { @media (min–moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6/2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) { background-image: url($image); background-size: $width $height; } } //Usage div.logo { background: url(“logo.png”) no-repeat; @include image-2x(“logo2x.png”, 100px, 25px); } Featured images or native custom fields could also … Read more

What is difference between add_theme_support and Theme Customization API?

They’re not directly really related, and do different things, except for a couple of situations. The Customization API is a way of registering settings and controls in the Customizer, and is very flexible. You can use it to add controls for just about anything in your theme. add_theme_support(), on the other hand, lets your theme … Read more

add_theme_support( $feature=’menus’ )

From the documentation for add_theme_support(): The following parameters are read only, and should only be used in the context of current_theme_supports(): … menus: Use register_nav_menu() or register_nav_menus() instead. … So your theme shouldn’t be using add_theme_support($feature=”menus”) to begin with. Support is automatically added by register_nav_menu(). If you don’t want menu options for your theme, make … Read more