• Resolved Mattia

    (@albazeus)


    Hello,

    I’d like to add a section right above the footer, like this one:
    https://medical.oceanwp.org/

    At the bottom, the blue section above the footer with these elements: ‘Medical Treatment’, ‘Emergency Help Admissions’, ecc.

    Can you please explain how to do it?

    Thanks

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    You can achieve it by fallowing any one of the method.

    1) Create a template in Theme panel > my library. Copy the shortcode and paste in every page.
    Edit page > oceanwp settings > shortcode > before the footer.

    2. Use a child theme. First register a sidebar in that location above the footer. Go to appearance > widgets and add template shortcode from the above process.

    3. Use Ocean Footer Callout plugin.

    Thread Starter Mattia

    (@albazeus)

    Hi,

    thanks for your help. Solution #1 works perfectly. Here:
    /sample

    However, since I’m already using a child theme, I’d like to implement the #2. Can you please provide some instructions to registrer a sidebar with oceanwp? I already found some tutorials, but since it requires messing with functions.php, I’d like some official info. I don’t want to make mistakes.

    Thanks

    Oh, I forgot to attach the documentation. Here you go – register sidebar

    Add this code in your child theme function.php file. Don’t forget to call registered sidebar in footer.php file.

    After finishing it, go to the appearance > widget and add your shortcode here.

    Thread Starter Mattia

    (@albazeus)

    Hi,

    I added the sidebar in functions.php:

    /* Sidear before the footer */
    function footer_sidebar_mattia() {
        register_sidebar( array(
            'name' => __( 'Pre-Footer Sidebar', 'oceanwp' ),
            'id' => 'pre-footer-sidebar',
            'description' => __( 'Widgets in this area will be shown on all posts and pages, before the footer.', 'oceanwp' ),
            'class' => '',
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget'  => '</li>',
        'before_title'  => '<h4 class="widgettitle">',
        'after_title'   => '</h4>',
        ) );
    }
    add_action( 'widgets_init', 'footer_sidebar_mattia' );
    

    I copied the footer.php in the child theme directory and added a call so:

            </main><!-- #main -->
    
            <?php do_action( 'ocean_after_main' ); ?>
    
            <?php dynamic_sidebar('pre-footer-sidebar'); ?>
    
            <?php do_action( 'ocean_before_footer' ); ?>
    

    Now I see the sidebar. I added the language switcher and it works. Fantastic.
    But I can’t find a way to add a shortcode to it. What’s the name of the widget?

    Thanks

    Hello,

    Go to appearance > widgets > Pre-footer Sidebars and add a textbox (text). Paste the shortcode in this textbox.

    Thread Starter Mattia

    (@albazeus)

    Awsome thanks! It works perfectly!

    Glad to hear that!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘bottom bar’ is closed to new replies.