Dynamic Title for custom post types

I use something like this in my header.php: <title> <?php if(is_front_page()) echo “Front Page Title”; else if(is_404()) echo “Page Not Found”; else the_title(); echo ‘ | ‘.get_bloginfo(‘name’); ?> </title> Check out Conditional Tags for more information. As a Function() : functions.php function setTitle(){ global $post; $title = get_the_title(); $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), … Read more

Adding header function to theme

This code adds theme support for custom headers which adds a new page under Appearance in the wp dashboard. function themes_custom_header_setup() { add_theme_support( ‘custom-header’, $defaults, array( ‘default-text-color’ => ‘fff’, ‘width’ => 1260, ‘height’ => 240, ‘flex-height’ => true, ‘wp-head-callback’ => ‘themes_header_style’, ‘admin-head-callback’ => ‘themes_admin_header_style’, ‘admin-preview-callback’ => ‘themes_admin_header_image’, ) ) ); } add_action( ‘after_setup_theme’, ‘themes_custom_header_setup’ ); … Read more

Where is the stylesheet code?

The most common would be /wp-content/themes/your-theme-name/style.css but this may not be the case depending upon the theme you are using. The easiest way to find out is to use Chrome Developer Tools. In Chrome open your website and right click on the element you would like to alter the CSS for, then click ‘Inspect Element’. … Read more

How to create a custom header?

Please check your code formatting – in your question, there are unmatched quotes for your background image, as well as the second half of a background declaration for the second #header line. Once you have fixed these issues, come on back and let us know if it worked or try and give some context i.e. … Read more

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