How Redirecting non-www to www in wordpress without using .htaccess?

Hello Everyone! I am here now just going to tell you all a simple way for redirect your wordpress website from non www(http://yourdomain.com) to www((http://www.yourdomain.com)) URL  OR  www(http://www.yourdomain.com) url to non-www((http://yourdomain.com)) URL. WordPress will 301 redirect your domain to the version (www or non-www) located in the Settings->General. Here you have just need to change …

How register/create new custom post type using hooks in wordpress site?

hello everyone If you are planning to create a custom post type then use my code, hope you will enjoy my code. Add this code in your theme function file add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { register_post_type( ‘R_News’, array( ‘labels’ => array( ‘name’ => __( ‘News’ ), ‘singular_name’ => __( ‘News’ ) ), ‘public’ …

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 to create custom custom SEO friendy url ?

Hello friends, If you want remove the footer from admin then please follow these steps : Go to your theme folder Open function.php file in editor add this code in your function : //create custom seio friendly url using page slug “product” function add_profile_rewrite() { add_rewrite_tag(“%mode%”, ‘([^/]*)’); add_rewrite_tag(“%det%”, ‘([^/]*)’); /*add_rewrite_tag(“%video_src%”, ‘([^/]*)’); add_rewrite_tag(“%video_title%”, ‘([^/]*)’);*/ // Before …