How to Add a Banner in WordPress (Four Ways)

horizontal scrollAlso often referred to as a banner, it can significantly enhance the user experience and the visual appeal of your website in your website pages. You can use it toShowcase Limited Time Offer,Publishing UpdatesorReinforcement of brand imageAll banners help to get visitors' attention, increase conversions and improve the aesthetics of your website.

图片[1]-如何在WordPress添加横幅?4种简单方法

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:

  1. Log in to the WordPress dashboard.
  2. switch toAppearance > EditorThe
图片[2]-如何在WordPress添加横幅?4种简单方法
  1. Open the template where you want to place the banner (e.g. home page or header).
  2. Click + (add block)button, selectCover block.
图片[3]-如何在WordPress添加横幅?4种简单方法
  1. Upload or select a banner image.
图片[4]-如何在WordPress添加横幅?4种简单方法
  1. Customize text, color and alignment.
  2. strike (on the keyboard)save (a file etc) (computing)The
图片[5]-如何在WordPress添加横幅?4种简单方法

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 onSmart Slider 3e.g.

Steps:

  1. switch toPlugins > Install PluginsThe
  2. Search and installSmart Slider 3The
图片[6]-如何在WordPress添加横幅?4种简单方法
  1. Enable the plugin and go to the plugin dashboard to create a new project.
图片[7]-如何在WordPress添加横幅?4种简单方法
  1. Upload the banner image and save the changes.
图片[8]-如何在WordPress添加横幅?4种简单方法

Smart Slider 3It's easy to just use the template that comes with it.

图片[9]-如何在WordPress添加横幅?4种简单方法

3. Use page builders (such asElementor)

The page builder offers more customization options to add banners through the visual interface.

Steps:

  1. Install and enableElementorThe
  2. Edit the page you want to add the banner to.
  3. Add a new section and insert the banner widget (search for "image").
图片[10]-如何在WordPress添加横幅?4种简单方法
  1. Upload or design banners and customize them.
图片[11]-如何在WordPress添加横幅?4种简单方法
  1. 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:

  1. switch toAppearance > Theme File EditorThe
  2. show (a ticket)header.phpor other template files.
图片[12]-如何在WordPress添加横幅?4种简单方法
  1. 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.

  1. existAppearance > Customization > Extra CSSAdd a style to the
.custom-banner img { width: 100%; height: auto; }
图片[13]-如何在WordPress添加横幅?4种简单方法
  1. 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种简单方法

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.

Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
客服微信
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: [email protected]
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
本文作者:红牛独立站
THE END
If you like it, support it.
kudos14 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments