change permalinks as per your choice in wordpress

WordPress publishing URL you can change to anything using following function. Following wordpress hook is very important. You can publish article with different URL or domain also. Using your blog you can publish your article to another URL also.

change permalinks as per your choice in wordpress

You just need to open your functions.php file and put following function in that file.

<pre><pre>
add_filter('post_link', 'fitsmi_post_link');
function fitsmi_post_link($permalink) {
	global $post;
        $permalink = str_replace("wordpress/", "", $permalink);
        return $permalink;
	if (!isset($post))
		return $permalink;
	else
		return 'http://hack.by.wordpressapi/';
}
change permalinks as per your choice in wordpress using post_link filter

change permalinks as per your choice in wordpress using post_link filter

 

With following function you need to be very careful.

Add a Comment

Your email address will not be published. Required fields are marked *