Web Shakehands
Web Shakehands

Language


Use add_theme_support() to set custom header for WordPress



WordPress header images can be easily set in the form of buttons using the "custom header" function.
This eliminates writing complex HTML and is endorsed as a useful feature of WordPress.

How can you use this custom header?
If you create your own theme, you may want to set the header image as well as the default value you like.



The WordPress function that makes this possible is add_theme_support ().

Here, I set the standard key of WordPress in the array to $args.
For example, width and height is the size of the header image. Also, if you want to introduce a background image, use default-image.

Once installed, name custom-header as the first argument to the add_theme_support function, and place $args containing an array as the second argument.

Write all these codes in the functions.php of the theme.

A description is given in this Codex, so please refer to it.
https://codex.wordpress.org/Custom_Headers



このエントリーをはてなブックマークに追加

This article title

Use add_theme_support() to set custom header for WordPress

Previous article How to correctly write "hard-coded URL" in wordPress theme


WordPress Theme creation Article !

2019-08-24 The priority order of the WordPress template file NEW!


2019-08-22 Display WordPress "Posted Articles List" in short code


2019-08-01 Use add_theme_support() to set custom header for WordPress


2019-07-24 How to correctly write "hard-coded URL" in wordPress theme


2019-07-19 TGM Plugin Activation is a tool that can install a plugin from WordPress theme


2019-07-13 How to use Bootstrap inside WordPress theme


See all the articles list

Just enter your E-mail and you will receive free
mail magazine about how to make your website etc.
E-mail:
  

Go to top