Menu Responsive

Your nav menu bar responcive while can user bootstrap framework. This like code insert in function.php Bootstrap responcive nav menu wordpress // This code insert in header.php <div class=”container”> <nav class=”navbar navbar-default” role=”navigation”> <div class=”navbar-header”> <button type=”button” class=”navbar-toggle” data-toggle=”collapse” data-target=”#medi-temp-navbar-collapse”> <span class=”icon-bar”></span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> </button> </div> <div class=”collapse navbar-collapse” id=”medi-temp-navbar-collapse”> <?php if ( … Read more

Import HTML code that loads css and javascript into specific page

Add CSS and JS Particular Page. Put this code in your current active theme function.php file <?php function function_name() { is_page( ‘about-me’ ) //is_page( ‘PAGE_SLUG_NAME’ ) { wp_enqueue_style( ‘stylecss’, get_template_directory_uri() .’/css/style.css’,”, ‘3.3.1’ ); wp_enqueue_script( ‘script’, get_template_directory_uri() . ‘/js/script.js’, array ( ‘jquery’ )); } } add_action( ‘wp_enqueue_scripts’, ‘function_name’ ); ?>

How to use Datatable with Ajax when creating plugin on WordPress?

Solution to my own problem: Enqueue your custom file.js and localize admin-ajax.php. index.php function script_enqueue() { // Register the JS file with a unique handle, file location, and an array of dependencies wp_register_script(“dt_csc”, plugin_dir_url(__FILE__). ‘js/cdt.js’, array(‘jquery’)); // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily … Read more