• Resolved panda

    (@alejorostata)


    In the My-Account page, if the user is not logged in, the Login or Register Form will be shown. I wanted to remove the Header and Footer only for that state to make it simple and let the users focus only on the form, is that possible? Can it be done using Hook?

    Something like;

    function remove_header_footer(){
      if(!is_user_logged_in() && is_page('my-account')){
         //Remove the header and footer
      }
    }
    add_action('WHAT-ACTION-TO-USE?', 'remove_header_footer');
    • This topic was modified 5 years, 9 months ago by panda.
    • This topic was modified 5 years, 9 months ago by panda.
Viewing 1 replies (of 1 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @alejorostata,

    Removing the header and footer on any page would be dependent on the code of the WordPress theme which you’re using and not WooCommerce itself.

    I’d suggest reaching out to the developer of the WordPress theme you’re using as they may be able to offer some guidance for you. They may have a specific action in their theme which adds the header and footer.

    Alternatively, you could try using some CSS to hide the elements like in this example.

    https://wordpress.org/support/topic/hide-header-footer-on-certain-pages/

Viewing 1 replies (of 1 total)

The topic ‘Remove the Header and Footer if My-Account is showing Login/Register Form’ is closed to new replies.