![图片[1]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250329174950796-image.png)
How to add a banner in WordPress?
1. Using the WordPress site editor
If yourWordPress websiteFull Site Editor (FSE) is supported by default like Twenty Twenty-Four. you can easily add banners through WordPress built-in editor.
Steps:
- Log in to the WordPress dashboard.
- switch toAppearance > EditorThe
![图片[2]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250329175436946-image.png)
- Open the template where you want to place the banner (e.g. home page or header).
- Click + (add block)button, selectCover block.
![图片[3]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250329180657735-image.png)
- Upload or select a banner image.
![图片[4]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250329180853200-image.png)
- Customize text, color and alignment.
- strike (on the keyboard)save (a file etc) (computing)The
![图片[5]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250329181012657-image.png)
2. Use of plug-ins
By using the plugin, you can easily add banners and also have more control over the banners such astimed (of explosive etc),rotatemaybeWith buttonsThe banner.
Recommended Plugins:
- Simple Banner: Suitable forbulletinBanner.
- WPFront Notification Bar: Suitable for fixedpromoteBanner.
- Smart Slider 3: Suitable foranimeBanner.
We are based on
Steps:
- switch toPlugins > Install PluginsThe
- Search and install
Smart Slider 3 The
![图片[6]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330120406619-image.png)
- Enable the plugin and go to the plugin dashboard to create a new project.
![图片[7]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330121001434-image.png)
- Upload the banner image and save the changes.
![图片[8]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330121348183-image.png)
![图片[9]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330121252486-image.png)
3. Use page builders (such asElementor )
The page builder offers more customization options to add banners through the visual interface.
Steps:
- Install and enableElementorThe
- Edit the page you want to add the banner to.
- Add a new section and insert the banner widget (search for "image").
![图片[10]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330121813486-image.png)
- Upload or design banners and customize them.
![图片[11]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330121917561-image.png)
- strike (on the keyboard)Updates/releasesThe
4. Manual addition by code
If you're code-savvy, you can manually add banners directly through HTML and CSS.
Steps:
- switch toAppearance > Theme File EditorThe
- show (a ticket)header.phpor other template files.
![图片[12]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330123249663-image.png)
- Insert the following HTML code:
<div class="custom-banner"> <img src="your-banner-image-url.jpg" alt="Banner"> </div>
What this code does:
Create a div block, the class name is custom-bannerThe
A picture (your banner image) is inserted in this block.
your-banner-image-url.jpg It's an image link, replace it with the address of your own banner image when you actually use it.
- existAppearance > Customization > Extra CSSAdd a style to the
.custom-banner img { width: 100%; height: auto; }
![图片[13]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330123121532-image.png)
- strike (on the keyboard)postThe
It is usually not recommended to directlyTheme File EditorYou can change the code in theCode SnippetsPlugins foundFunctionsAdd
![图片[14]-如何在WordPress添加横幅?4种简单方法](https://www.361sale.com/wp-content/uploads/2025/03/20250330123001554-image.png)
Best Practices for Adding Banners in WordPress
- Use high quality images: Ensure that banners are visually appealing and optimized.
- Ensure mobile friendliness: Test how the banner appears on different devices.
- Add a call to action button (
CTA ): Encourage visitors to take action. - make superiorSEO: Use proper alt text and compress images to increase loading speed.
By following these best practices, you can ensure that banners not only look great, but also improve site performance and user experience.
summarize
Adding a banner (Banner) to WordPress is an effective way to enhance the visual appeal and user experience of your website. Whether it's through the built-in site editor, plugins, page builder, or writing the code manually, each method has its own scenarios and advantages.
- Site Editor: Fits simple banners, operates intuitively and requires no plug-ins.
- plug-in (software component)(e.g. Smart Slider 3): feature-rich, suitable for rotating, animated or timed banners.
- page builder(e.g., Elementor): Provides a high degree of customization, suitable for complex design needs.
- manual code: For developers, who like to toss things around and are flexible but need a technical base.
Link to this article:https://www.361sale.com/en/48239/The article is copyrighted and must be reproduced with attribution.




















![表情[wozuimei]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![表情[baoquan]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments