mazey-wordpress-utils
Wordpress utilities.
Install
You can get mazey-wordpress-utils via npm.
npm install mazey-wordpress-utils --save
Usage
Hide Sidebar.
import { hideSidebar } from 'mazey-wordpress-utils';
hideSidebar({
urlContainList: [ 'hide_sidebar' ], // It's a list for String in URL, `[ 'hide_sidebar' ]` is the default value.
});
Hide Header, the page will hide 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
.
https://wordpress.org/plugins/easy-table-of-contents/
import { hideHeaderInTOC } from 'mazey-wordpress-utils';
hideHeaderInTOC({
urlContainList: [ 'str1' ], // It's a list for String in URL, `[ 'urlContainListDefaultValue' ]` is the default value.
});
Develop
# dev
npm run dev
# build
npm run build
# documentation
npm run docs