It's an extension kit for our theme https://github.com/hieu-pv/nf-theme, (*1)
Before Installation
Step 1: Install Nf-Theme-Option package
nf-theme-option, (*2)
, (*3)
Installation
Step 1: Install Through Composer
composer require vicoders/menu-kit
Step 2: Add the Service Provider
Open config/app.php
and register the required service provider., (*4)
'providers' => [
// .... Others providers
\Vicoders\Menu\MenuServiceProvider::class,
],
Step 3: import css and js
import js of package menu-kit in file (wp-content/themes/{name_theme}/resources/assets/scripts/app.js);, (*5)
import '../../../vendor/vicoders/menu-kit/assets/dist/app.js';
import css of package menu-kit in file (wp-content/themes/{name_theme}/resources/assets/styles/app.scss);, (*6)
@import '../../../vendor/vicoders/menu-kit/assets/dist/app.css';
Step 4: Add shortcode
Automatic create a shortcode name menu-vicoders
with a attribute theme_location
is require:, (*7)
[menu-vicoders theme_location="{location_menu}"]
Example:, (*8)
[menu-vicoders theme_location='main-menu'"]
Step 5: Insert shortcode wherever you need
Very easy, (*9)
do_shortcode("[menu-vicoders theme_location='main-menu'"]")
Last step
{tip} Drink tea and relax !, (*10)