Adding Bootstrap to WordPress TwentySixteen Theme

If you want to link stylesheets and scripts in wordpress,the correct way is to use wp_enqueue_style() and wp_enqueue_scripts() in your functions.php file Try this in your functions.php file wp_enqueue_style(‘bootstrap-css’,get_template_directory_uri().”https://wordpress.stackexchange.com/bootstrap/css/bootstrap.min.css”); wp_enqueue_script(‘jquery’,get_template_directory_uri().’/scripts/jquery.min.js’); wp_enqueue_script(‘bootstrap-js’,get_template_directory_uri().’/bootstrap/js/bootstrap.min.js’);

jQuery accordion menu

Add the menu_class argument with value of cd-accordion-menu to your code, so that it looks like this: <div class=”menu-container”> <nav id=”site-navigation” class=”main-navigation” role=”navigation”> <?php wp_nav_menu(array( ‘theme_location’ => ‘primary’, ‘sort_column’ => ‘menu_order’, ‘menu’ => ‘Categories’, ‘container_class’ => ‘main-menu’, ‘menu_id’ => ‘primary-menu’, ‘menu_class’ => ‘cd-accordion-menu’ ) ); ?> </nav><!– #site-navigation –> </div><!– #menu-container –> You can see … Read more

Custom Post Type – after disable ‘Add New’, I can’t edit and delete post

Full credit to this answer on Stack Overflow: you need to set the create_posts value to do_not_allow (or false in WordPress versions below 4.5) and crucially set the map_meta_cap to true: register_post_type( ‘custom_post_type_name’, array( ‘capability_type’ => ‘post’, ‘capabilities’ => array( ‘create_posts’ => ‘do_not_allow’, // Prior to WordPress 4.5, this was false ), ‘map_meta_cap’ => true, … Read more