Setting multiple default background images?
There is no direct way of doing that as far as I can see. But I got hold of this plugin which allows you to create Image Sets and set random background images -> Background Manager
There is no direct way of doing that as far as I can see. But I got hold of this plugin which allows you to create Image Sets and set random background images -> Background Manager
I have copy-pasted your function into my dev install and your two controls show up in the customizer, both with a static front page and with a blog posts front page. So something is messing with is_front_page in your install. If I were you I’d echo the conditions in function to see if something is … Read more
Your not going to get an answer to this, there is no magic wand you can use to change what your asking without working it out yourself, or at the very least supplying some actual code with your question. To change the CSS in a back-end option page you can use the Options API, http://codex.wordpress.org/Options_API, … Read more
I just found this handy little function that ads the ability to reverse the menu output order. it might come in handy: /** * Enables a ‘reverse’ option for wp_nav_menu to reverse the order of menu * items. Usage: * * wp_nav_menu(array(‘reverse’ => TRUE, …)); */ function my_reverse_nav_menu($menu, $args) { if (isset($args->reverse) && $args->reverse) { … Read more
this is the solution to wrap the content after the title like this ‘before_widget’ => ‘<li>’, ‘after_widget’ => ‘</div></li>’, ‘before_title’ => ‘<h2 class=”widgettitle”>’, ‘after_title’ => ‘</h2><div class=”widgetcontent”>’ ); ?> the important markup is the <div class=”widgetcontent>” in the after_title, and the closing </div> in the after_widget, this will result in this html markup: <ul> <li> … Read more
At the moment (3.8) color schemes do not apply to admin bar at front end at all, even if user is logged in and has non-default scheme selected. The shortest way would probably be to force enqueue color scheme at front end: add_action( ‘wp_enqueue_scripts’, function () { wp_enqueue_style( ‘color-admin-bar’, admin_url( ‘/css/colors/coffee/colors.min.css’ ), array( ‘admin-bar’ ) … Read more
The best way to solve this is to simplify your code. Right now, ScriptQueuer::QueueCss() is just a static method, and it is getting its data too late. You could use an immutable object instead and then just register one of its methods as callback. Example: class Enqueuer { private $stylesheets; public function __construct( ArrayObject $stylesheets … Read more
The workhorse is WP_Theme::get_page_templates() (wrapped by the helper function get_page_templates()). If you check out the source, you’ll see: /** * Filter list of page templates for a theme. * * @since 3.9.0 * @since 4.4.0 Converted to allow complete control over the `$page_templates` array. * * @param array $page_templates Array of page templates. Keys are … Read more
The second form can be handy too: We can also use the third parameter: the_title( $before, $after, $echo ); to assign the title to a variable. Here’s an example: $title = the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’, false ); This can also help reducing the use of <?php ?> delimiters. Here’s an example from the Twenty Fifteen … Read more
If a user can not change them then they are not options, they are constants. Declare them using const in your maim theme file (probably functions.php but any other files that is being always loaded will do), and use them wherever you have use the “options” array now. If you want to control it without … Read more