How display custom menu navigation on post/page

Hello Everyone! if you are planing to add your custom menu from anywhere in post,then add this code in your theme function file. /* Custom code for call menu any where [menu name=”Site-Map”]*/ function print_menu_shortcode($atts, $content = null) { extract(shortcode_atts(array( ‘name’ => null, ), $atts)); return wp_nav_menu( array( ‘menu’ => $name, ‘echo’ => false ) …

How Remove Category Base From URL In WordPress Site?

Hello Everyone, If you are trying to remove “category” base from url  without any plugin then use my this code URL Before Add this code  like http://raghunathgurjar.wordpress.com/category/wordpress/ URL After Add this code in your theme function like this http://raghunathgurjar.wordpress.com/wordpress/ ———————————————————————————————————— /* Remove category base usign hooks */ register_activation_hook(__FILE__,    ‘raghunath_category_base_refresh_rules’); register_deactivation_hook(__FILE__,  ‘raghunath_category_base_deactivate’); /* actions */ add_action(‘created_category’,  …

How Hide "Edit Permalink & View Post" buttons for Custom Post Type on Edit Screens

Hello Everyone! If you want hide the view button for custom post type then you can use this code. The following code will remove the edit permalink and view post button from your edit/add custom post type screens. In this example I have allowed for three different CPTs to be targeted but you can adjust …

How get a category list using custom query in wordpress?

Hello Everyone, If you want reterieve a category list any where in your theme page then use this code <ul> <?php wp_list_categories(‘orderby=name&include=3,5,9,16’); //here 3,5,9,16 is the category id,so you can change this according your requirement  ?> </ul> Please have a look on on this link http://codex.wordpress.org/Template_Tags/wp_list_categories for more option   Enjoy Code!