By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
DaltonitDaltonitDaltonit
Search
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Reading: How to Display Announcement Banner on Specific Posts and Pages daltonit
Share
Sign In
Notification Show More
Font ResizerAa
DaltonitDaltonit
Font ResizerAa
Search
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
WordPressEnglish

How to Display Announcement Banner on Specific Posts and Pages daltonit

Dalton
Last updated: 5:03 pm
Dalton
Share
5 Min Read
SHARE

How to Display Announcement Banner on Specific Posts and Pages

Contents
Configuring the Settings #What are Rules? #Creating Custom Rules to Show/Hide Announcement Bar #Conclusion #
display announcement banner on specific posts and pagesOften times when you are displaying a notification bar or message bar you may want to restrict it to specific posts and pages.

You may want to share a message about a coupon code only on certain product pages.

There are numerous reasons similar to this. Most notification bar plugins do not provide an extensive feature to configure this.

In this article, I’ll use the Announcer WordPress plugin and share how we can use it to display announcements on certain pages.

The Announcer plugin is one of the best plugins to display notification bars with all the features available out of the box. The feature mentioned below is available in the free version itself.

Configuring the Settings #

If you are new to the Announcer WordPress plugin, you can learn more about it in the display announcement bar in WordPress getting started guide.

After creating an announcement bar, go to the Announcement edit page.

Under the Settings section, switch to the “Location rules” tab.

You can see 3 options

  • Show in all pages
  • Hide in all pages
  • Show in selected pages
  • Hide in selected pages

Show in all pages – Display the announcement bar on all the pages of your website.

Hide in all pages – Hide the announcement bar on all the pages of your website.

Show in selected pages – Display the announcement bar only on specific pages. You can create your own rules.

Hide in selected pages – Hide the announcement bar only on specific pages. You can create your own rules.

What are Rules? #

When you select “Show/hide in selected pages” option, you are offered a section where you can build your own rules.

Rules consist of different conditions. A condition consists of 3 elements.

There are different criteria offered by the plugin like Posts, pages, Home page, Front page, Post type, Archive page, etc.

The operator decides how the condition has to be evaluated.

The value is the one where you enter the desired data to be met for the condition.

Let’s say you want to show the announcement only in selected posts. You will add criteria called “Single post” with the operator selected as “is” and value set as the post IDs.

You can also add more sub-conditions to a rule.

If any of the rules are met, then the announcement will be shown/hidden as selected previously.

Creating Custom Rules to Show/Hide Announcement Bar #

Configuring custom rules to show announcement bar on specific pages
Configuring custom rules to show announcement bar on specific pages

Now, let’s try to show the announcement only on posts having a specific category.

Select “Show in selected page” and click “Add new rules”

Select “Single post” as criteria, “is” as the operator, and leave the value empty. Here we have added a condition saying that show the announcement in all the “posts”

But we need to show the posts which have a specific category right?

To do this, click the “+” button to add another sub condition to the main one. You will see this condition nested below the main one.

Now select “Categories of post” as criteria, “is” as the operator, and select the category you want as value.

That’s it, now we have added a rule saying show the message bar on all posts, where the category is as selected.

Similarly, you can add more rules for the same notification bar.

Hit publish to save and see the message bar in action only on the posts which has that category.

Similarly, if you want to hide the announcement bar except for the posts which have that category, you can select “Hide in selected pages”.

Conclusion #

Displaying notification bars is necessary for any website to gather audience attention and drive sales.

Also, showing them on specific posts and pages makes them special for the audience.

We saw how easy was it to create rules to conditionally display an announcement bar on a WordPress site.

If you have any questions or doubts, please feel free to share them in the comments box below.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Share
Previous Article Top 3 features of Announcer WordPress plugin daltonit
Next Article 5 Tips to Enhance your Notification Bar daltonit
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Which could be 2025’s breakout millionaire maker? daltonit
  • SUI crypto surges over 30% as meme coins gain traction daltonit
  • Aptos Foundation invests in Universal Health Token to advance decentralized healthcare daltonit
  • Prompt engineering: conduct a Diamond Model of Intrusion Analysis daltonit
  • US court permits Three Arrows Capital to expand claim against FTX, rejects FTX’s objections daltonit

Recent Comments

  • Connor on Here’s Why Business Needs a Mobile-Friendly Website
  • Connor on Here’s Why Business Needs a Mobile-Friendly Website
  • Connor on Here’s Why Business Needs a Mobile-Friendly Website

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • Which could be 2025’s breakout millionaire maker? daltonit
  • SUI crypto surges over 30% as meme coins gain traction daltonit
  • Aptos Foundation invests in Universal Health Token to advance decentralized healthcare daltonit
  • Prompt engineering: conduct a Diamond Model of Intrusion Analysis daltonit
  • US court permits Three Arrows Capital to expand claim against FTX, rejects FTX’s objections daltonit

Search

Follow US
Daltonit. All Rights Reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?

Not a member? Sign Up