How to create custom custom SEO friendy url ?


Hello friends,

If you want remove the footer from admin then please follow these steps :

    1. Go to your theme folder
    2. Open function.php file in editor
    3. 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 And After
          add_rewrite_rule('product/([^/]*)/?$', 'index.php?pagename=product&mode=$matches[1]', 'top');
         
      }
      add_action( 'init', 'add_profile_rewrite' );
      

Save file

Enjoy Code!

<

Advertisements

Sr. Software Engineer

Tagged with: , , ,
Posted in Wordpress
2 comments on “How to create custom custom SEO friendy url ?
  1. Santos says:

    Howdy! This post could not be written any better!
    Looking through this article reminds me of my previous
    roommate! He always kept preaching about this. I most certainly will forward this post to him.
    Fairly certain he will have a very good read. Thank you for sharing!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: