change default RSS feed URL

I found my answer here : https://wordpress.stackexchange.com/a/214883/71314 function remove_feed( $feedname ) { global $wp_rewrite; if ( in_array( $feedname, $wp_rewrite->feeds ) ) { $wp_rewrite->feeds = array_diff( $wp_rewrite->feeds, array( $feedname ) ); } $hook = ‘do_feed_’ . $feedname; // Remove default function hook remove_all_actions( $hook ); add_action( $hook, $hook ); return $hook; } Usage: remove_feed( ‘feed’ );

url_to_postid returns 0

when you are at the post URL, you don’t need to work with referer (which is not reliable moreover) but with $GLOBALS[“post”] because you are in the PHP code which generate the page then you can have the post ID with that : $post_id = $GLOBALS[“post”]->ID;

How to add new post using a form to categories when categories are using as menu

The post_category parameter has to be an array, try this: $post = array(‘post_type’=>’post’, ‘post_author’=>$author, ‘post_status’=>’publish’, ‘post_title’ => ‘Test Title’, ‘post_category’ => array(‘679′) ); Ref: http://codex.wordpress.org/Function_Reference/wp_insert_post#Parameters If that doesn’t work for you, try using category_name: ‘category_name’ => ‘category_name’,