Home > CMS Tutorial > WordPress > How to set up banner in wordpress

How to set up banner in wordpress

爱喝马黛茶的安东尼
Release: 2019-07-19 15:53:01
Original
8387 people have browsed it

How to set up banner in wordpress

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(&#39;acf_add_options_page&#39;) ) 
{
acf_add_options_page(array( &#39;page_title&#39; => &#39;Theme General Settings&#39;,&#39;menu_title&#39;=> &#39;Banner图&#39;,
&#39;menu_slug&#39; => &#39;theme-general-settings&#39;,&#39;capability&#39;=> &#39;edit_posts&#39;,&#39;redirect&#39;=> false ,&#39;position&#39;=> &#39;4.1&#39;));
}
?>
Copy after login

How to set up banner in wordpress

Refresh the WordPress backend, and the option button corresponding to the “banner image” will appear.

How to set up banner in wordpress

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.

How to set up banner in wordpress

How to set up banner in wordpress

##Related recommendations: "

WordPress Tutorial"

Add "Large Paragraph" to the field group The content" field is as shown in the figure:

How to set up banner in wordpress

Add three fields to the "large content": img, link, alt; the large content is recyclable content, so Fields can also be added under the large content field.

How to set up banner in wordpress

How to set up banner in wordpress

How to set up banner in wordpress

Don’t forget to save.

How to set up banner in wordpress

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template