• Resolved samabernathyy

    (@samabernathyy)


    Hi,

    I’m hoping for some assistance getting this plug-in to work with my theme – The bar isn’t showing up for me.

    I tried this method to no avail:
    1. Go into the plugin folder, open “easy-notification-bar.php” file.
    2. On line 163 find: add_action( ‘wp_body_open’
    3. Change to: add_action( ‘ocean_before_outer_wrap’

    Perhaps I didn’t do it right?
    I’m using the Brooklyn theme by United Themes.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wpexplorer

    (@wpexplorer)

    Hi,

    Sorry for the delayed response. It seems www.ads-software.com isn’t sending me emails whenever someone asks a question and I have no idea why. I just saw this when coming to the page looking for something else.

    Now, this plugin relies on the core wp_body_open hook – https://developer.www.ads-software.com/reference/functions/wp_body_open/ (required in WordPress and introduced in 5.2.0).

    It sounds like the Brooklyn theme hasn’t updated their theme yet. You can manually edit the header.php file of the Brooklyn theme and add the following code right after the body tag:

    <?php
    if ( function_exists( ‘wp_body_open’ ) ) {
    wp_body_open();
    } else {
    do_action( ‘wp_body_open’ );
    } ?>

    Of course it would be a great idea to let the theme support team know about this issue so they can update their theme accordingly. It has been over a year now since this new hook was introduced and required in WordPress.

    – AJ

    Hi AJ,

    Hoping you can help here : I added the code to header.php and I still can’t see the bar. What else can I try?

    Thanks!

    Plugin Author wpexplorer

    (@wpexplorer)

    Hi @camilledw

    It’s possible because of how the theme is coded its preventing it from working. What theme are you using? You really should contact the theme developers so they can fix the theme as it’s been over a year now since this WordPress hook has been a requirement for all themes.

    Technically the plugin should work in any well coded theme, however, it’s possible if the theme is doing some funky stuff then either the topbar could be beneath the content.

    – AJ

    note: It does seem the code snippet in my reply above didn’t paste itself properly so the issue may just be a formatting issue, here is the correctly formated code: https://gist.github.com/wpexplorer/36800bc683c27611de3779eeeb7fdb5a

    Why don’t you put this piece of code in the FAQ section directly?

    <?php
    if ( function_exists( ‘wp_body_open’ ) ) {
    wp_body_open();
    } else {
    do_action( ‘wp_body_open’ );
    } ?>

    Worked fine for me after adding to the header.php file, but I had to search the support forums first. Instead of directing users to the forums, why not provide a solution in the FAQ section already? ??

    • This reply was modified 4 years, 9 months ago by actronab.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bar not showing up’ is closed to new replies.