Add functions to the functions.php file. The functions file is generally in the theme directory and belongs to functional functions, /wp-content/themes/theme name/functions.php. Add the following functions :
<?phpif( function_exists('acf_add_options_page') ) { acf_add_options_page(array( 'page_title' => 'Theme General Settings','menu_title'=> 'Banner图', 'menu_slug' => 'theme-general-settings','capability'=> 'edit_posts','redirect'=> false ,'position'=> '4.1')); } ?>
Refresh the WordPress backend, and the option button corresponding to the “banner image” will appear.
Create a new field, just write any name; Location: drop-down selection option page, equal to the "banner diagram" selection just created, this function is to set a custom field Appear wherever.
WordPress Tutorial"
Add "Large Paragraph" to the field group The content" field is as shown in the figure:The above is the detailed content of How to set up banner in wordpress. For more information, please follow other related articles on the PHP Chinese website!