• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Academy Pro Banner

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Academy Pro Banner

This topic is: not resolved

Tagged: Academy Pro Banner

  • This topic has 5 replies, 3 voices, and was last updated 6 years, 11 months ago by ProfitForSaving.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • November 30, 2018 at 2:55 pm #224736
    Nelson Briggs
    Participant

    I created a new website at nelsonbriggs.com using the Academy Pro child theme, and I need to be able to set the dismissable banner to give each visitor the option of dismissing it every time they visit the site, but have it pop up again the next time they visit the site. Both giving them the control to "X" it out, and giving me the option to make sure they see it if I am running a promotion or have changed to a new promotion.
    Thanks!
    Nelson

    http://www.nelsonbriggs.com
    November 30, 2018 at 3:33 pm #224737
    Victor Font
    Moderator

    The top banner in Academy Pro works with cookies. The javascript API that manages the cookies can be found here: https://github.com/js-cookie/js-cookie.

    The code supplied with the theme is in the /js/top-banner.js file. The top banner cookie is set to expire after 7 days. You can see this at line 63.

    The API allows for changing the expiration. The expiration value Value can be a Number which will be interpreted as days from time of creation or a Date instance. If you omit the expiration, the cookie becomes a session cookie. Session cookies are deleted when the user closes the browser.

    Since you want the cookie to expire when the user leaves the site, edit the /js/top-banner.js and remove the expiration parameter.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    December 1, 2018 at 10:45 am #224762
    Nelson Briggs
    Participant

    Hi Victor...

    Thank you very much for helping me out with this! It worked, but it seems like it doesn't work with cellphone browsers. Would you be able to share how to make the banner nondismissable?

    And, I like your website... Looks like you may have used Academy Pro as well?

    Thanks!

    Nelson

    December 1, 2018 at 1:01 pm #224763
    Victor Font
    Moderator

    I am using Academy Pro, but a highly modified version with CSS Grid and Flex box.

    On mobile, you dismiss the banner the same way you do on desktop. You click the X. It may be possible the X is hidden by something on your phone. I'm not using the banner any longer, but when I did, I moved the X to top rather than leave it on the right side to make it more visible. You can adjust its position with CSS.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 24, 2019 at 3:33 pm #490241
    Nelson Briggs
    Participant

    Hi Victor... Do you know how to remove the close banner "X" link and the respective jQuery that wouldn't be required if the close link is gone? I have located what I think is the section whare the PHP would be changed, lines 595 - 608...

    function academy_do_top_banner() {

    if ( get_theme_mod( 'academy-top-banner-visibility', true ) ) {

    $button = sprintf( '<button id="academy-top-banner-close"><span class="sp-icon-x"></span><span class="screen-reader-text">%s</span></button>', __( 'Close Top Banner', 'academy-pro' ) );
    printf(
    '<div class="academy-top-banner">%s%s</div>',
    get_theme_mod( 'academy-top-banner-text', academy_get_default_top_banner_text() ),
    $button
    );

    }

    }

    Thanks!

    Nelson

    March 24, 2019 at 3:46 pm #490242
    ProfitForSaving
    Member

    I had the exact same problem but did not get it to work, when I had the same problem for some while ago. I think I started using another plugin, which fixed it, but I am not totally sure 🙂

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble