Page header menu links change

Note that you’re using a Custom Nav Menu, meaning that the contents of the menu can be customized. The easiest solution is simply to: remove the current “Our Doctors” page from the menu add your desired page to the menu edit the menu item to change the displayed title to “Our Doctors” save the menu

Conditional Custom Image Header

you could try the following right before you call the body_class() function: <?php $header_image = get_header_image(); if( !empty( $header_image) ){ $custom_body_class=”has-header-image”; } else { $custom_body_class=”no-header-image”; } ?> <body <?php body_class($custom_body_class); ?>>

Add credit to get_custom_header in alt

Use this for the alt=”” attribute on the custom header <img> tag … alt=”<?php $attachment_id = get_custom_header()->attachment_id; $alt = get_post_meta( $attachment_id, ‘_wp_attachment_image_alt’, true ); if ( count( $alt ) ) echo $alt; ?>” /> … and then just edit the media attachment and add the alt text.

How to change the background color of my header dynamically based on a Custom Posts types color value?

Because my neighborhoods were the only pages that required custom header colors i decided to just include its custom header within the single-neighborhood.php page so that the top header container, that was wrapping the navigation, logo, etc., would reflect the custom color chosen from the custom fields in the admin. It was the only way … Read more

How to set “lang” attribute for post/page title?

There is a the_title filter. You should be able to wrap the title in a <span> using that. add_filter( ‘the_title’, function($title) { return ‘<span lang=”ur”>’.$title.'</span>’; } ); A version compatible with an older PHP: function lang_attr_wpse_116733($title) { return ‘<span lang=”ur”>’.$title.'</span>’; } add_filter(‘the_title’,’lang_attr_wpse_116733′); If it were me, I’d add a checkbox on the post edit screen … Read more

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