Top Bar

Description

06.26c16v2 Top Bar

#1. Install Code

Note: This code require to useĀ Section Loader Supreme Plugin

#1.1. First, add a Page in Not Linked with Name/URL:

  • Name: Top Bar
  • URL: /top-bar

06.26c16v2 Top Bar

#1.2. Design your desired content. We will use content on this page as Top Bar content

06.26c16v2 Top Bar

You can set Minimum Height to prevent any padding appears on top/bottom of top bar

06.26c16v2 Top Bar

#1.3. Click Website > Pages

06.26c16v2 Top Bar

Scroll down to bottom > Click Custom Code > Code Injection

  • If you use Personal/Basic Plan and your site doesn’t support Injection, see #3.1

06.26c16v2 Top Bar

#1.4. Paste this code to Footer box

  • If you use Personal/Basic Plan and your site doesn’t support Injection, see #3.1
<!-- 06.26c16v3 Top Bar -->
<script>
window.TopBarConfig = {
  source: "/top-bar",
  headerSelector: ".header-announcement-bar-wrapper",
  backgroundColor: "#f3ede5",
  textColor: "#000",
  enableHeaderClick: true,
  showCloseButton: true,
  closeButton: {
    size: "20px",
    color: "currentColor"
  },
  clearDismissed: false
};
</script>
<script src="https://code.beaverhero.com/header/0626c16v1topbar.js"></script>

06.26c16v2 Top Bar

#2. Customize

#2.1. To change top bar background/text color, change Line 06, Line 07

backgroundColor: "#f3ede5",
textColor: "#000",

#2.2. To change close X icon size/color, change Line 10 to Line 13

closeButton: {
  size: "20px",
  color: "currentColor"
},

to something like this

closeButton: {
  size: "12px",
  color: "#f1f"
},

#3. Other

#3.1. If you use Personal/Basic Plan and your plan doesn’t support Injection, you can edit Site Footer

05.26c08v1 Event Default Location

Add a Block

05.26c16v1 Hover Text Show Image Follow Cursor

Choose Markdown

04.26c10v2 Header Sound Icon

Paste this code into Markdown

<script>
window.TopBarConfig = {
  source: "/top-bar",
  headerSelector: ".header-announcement-bar-wrapper",
  backgroundColor: "#f3ede5",
  textColor: "#000",
  enableHeaderClick: true,
  showCloseButton: true,
  closeButton: {
    size: "20px",
    color: "currentColor"
  },
  clearDismissed: false
};
</script>
<script src="https://code.beaverhero.com/header/0626c16v1topbar.js"></script>

06.26c16v2 Top Bar

Buy me a coffee