mazey-wordpress-utils
    Preparing search index...

    Function hideSidebar

    • Hide the sidebar on the webpage.

      Example: https://example.com/home?hide_sidebar

      hideSidebar({
      urlContainList: ['hide_sidebar', 'no_sidebar'],
      primarySelector: '#main-content',
      secondarySelector: '#sidebar'
      });

      Parameters

      • options: {} = {}

        Configuration options with a URL substring list and primary and secondary selectors.

      Returns boolean

      • Returns true if the sidebar was successfully hidden, false otherwise.