Why, when it comes to custom background and image, does ‘The first value registered’ win?
Why, when it comes to custom background and image, does ‘The first value registered’ win?
Why, when it comes to custom background and image, does ‘The first value registered’ win?
You have wp_head_callback as parameter at your arguments array, which is wrong. It should be wp-head-callback which is the correct spelling. Because of the wrong spelling the default value for wp-head-callback which is _custom_background_cb has been used, as the wrong spelling is unknown to WordPress – of course.
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
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
It probably does nothing. I cannot find any reference in the developer resources or the theme handbook. Also doing a quick search through WP source code shows this is only used in wp-includes/theme.php, and even there only in the parts about adding/removing theme support.
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
ERR_SPDY_PROTOCOL_ERROR
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
register_theme_directory() not working from mu-plugin
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