How to change admin bar color scheme in MP6 / WP 3.8 front end?

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

Is it possible to manipulate the list of page templates?

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

Different ways to display title

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

Modular theme settings

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)