How To Redirect Old url to new url WordPress Page Without Plugin

How To Redirect Old url to new url WordPress Page Without Plugin

WordPress Redirect Page Without Plugin

Plugin Like addons Maximum WordPress User using the plugin. When he is facing any problem in WordPress this time, we install a Plugin. But  Do You Know Plugin Is not Solution in your WordPress Website. Most of the WordPress Developer is not using the plugin. When Developer Facing Any Problem, They are using Code on their Website.

Today I am showing you how to redirect Page on your WordPress without a plugin. Some WordPress User They are don’t know Coding, and This Gyes don’t have Any Coding Knowledge. Simple He wants to redirect Old Page Redirect to New Page, and they are using various type of  Plugin. Then there website Loading Slow Etc.

Redirect page this is a very simple we will show you how to use this code on your WordPress. Please Follow All Stape. If you Not Follow All Stape, you can’t Redirect Your Page.

WordPress-Page-Redirect

How To Use This Code

Stape 1:- First OF All go to Your WordPress Website => Login In Your WordPress Dashboard=>Go to Appearance Section Click This=>Now Click Theme Editor=> Click and Find Theme Function (Function.php)=> Click Function.php=> Scroll Down Last Opction=> Finde Last Second Backate and Remove=> Copy code and Pest this Position.

Copy this Code on pest

add_action(‘wp_print_styles’, ‘fnRedirect’);
function fnRedirect() {
global $post;
if (‘old-slug’ == $post->post_name) {
wp_redirect( site_url() . ‘/new-slug’ );
die();
}
}

Stape 2:–  Edit this Code => You can See (OLD_slug) change (New_Slug) Like Your Old url is www.ttalkss.com/About-me to change New URL www.ttalkss.com/About. change type old (about-me) new Slug (about)=> Save. 

Second Option

Stape1:Open Cpanel=>Login in your Account=> Click File Manager => Click Public.html=> Click Wp Content=> Click Theme=>Find Function.php=>First Download This File=> Edit Online=> Scroll Down Last Section=> Remove Secon Backate=> Pest This Code=>Then Follow Stape 2

If You not Understand Follow this picture

StapeImage
1. Open WordPress WebsiteLogin In Your WordPress
2. Login Your DashBoard ON Your WordPressLogin WordPress Dashboard
3. Click Apperance and Click theme EditorAppearance and Theme Editor
Find Theme Function (Function.php)Function.php Theme Function
Change Codechange cording

 

Friends if Your Are Facing Any Problem You can Comments. I will reply to your Comments and or you can join our Facebook Group or Join Our Page or twitter.

You can contact me contact us page.

Leave a Reply

Close Menu