Call sidebar from a template

Impossible with get_sidebar(). From that function’s body: function get_sidebar( $name = null ) { do_action( ‘get_sidebar’, $name ); $templates = array(); if ( isset($name) ) $templates[] = “sidebar-{$name}.php”; $templates[] = ‘sidebar.php’; So if you pass a $name or any other custom value to the function, they will be set between two fixed strings. You can … Read more

How to get a different mobile menu than desktop menu in the twentytwelve child theme

As recommended in a similar post: https://wordpress.stackexchange.com/a/156494/74343 1.) Create the menus as you want them, and name them as you like, as an example “mobile-menu” and “desktop-menu“. 2.) In your child theme in the header.php you could switch according to the wp_is_mobile() flag like this: if ( wp_is_mobile() ) { wp_nav_menu( array( ‘menu’ => ‘mobile-menu’ … Read more

What is meant by __(‘page’,’twentytwelve’)

Internationalization and localization (commonly abbreviated as i18n and l10n respectively) are terms used to describe the effort to make WordPress (and other such projects) available in languages other than English, for people from different locales, who use different dialects and local preferences. __() is used when the message is passed as an argument to another … Read more

Remove Open Sans from Twenty Twelve theme

Found the answer here: Script dequeuing calls should be added to the wp_print_scripts action hook(..). This is because scripts are typically enqueued on the wp_enqueue_script hook, which happens early in the wp_head process. The wp_print_scripts hook happens right before scripts are printed, and thus is latest in the process. (Otto) Following the same logic we … Read more