Tag Info

New answers tagged

1

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'. The CSS files and classes which ...


1

You can use twentyfifteen_custom_header_args filter for customizing width and height. Check following example. add_filter( 'twentyfifteen_custom_header_args', 'theme_slug_custom_header_args' ); function theme_slug_custom_header_args( $args ){ $args['width'] = 600; $args['height'] = 800; return $args; } In the example, width is changed to 600 and ...


7

There is an action get_header that you can use. In your theme’s functions.php, register a callback for that action: add_action( 'get_header', function( $name ) { add_filter( 'current_header', function() use ( $name ) { // always return the same type, unlike WP return NULL === $name ? '' : $name; }); }); In your header.php, you get ...


0

As @Michael says, header_image() returns the URL, you need to echo it: <img src="<?php echo esc_url( header_image() ) ?>" ...



Top 50 recent answers are included