mazey-wordpress-utils
    Preparing search index...

    Function hideHeaderInTOC

    • Hide the header when it meets one of these two conditions:

      • Use WordPress Plugin Easy Table of Contents and open it in this page.
      • The page's URL is matched with one of the urlContainList.

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

      hideHeaderInTOC({
      urlContainList: ['hide_header_in_toc', 'no_header_in_toc'],
      headerSelector: '.site-header'
      });

      Parameters

      • options: {} = {}

        Configuration options with a URL substring list and header selector.

      Returns boolean

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