Animesh Kumar {itsAnimesh}

Animesh Kumar {itsAnimesh}

I'm an IT professional/FOSS Geek living and working in New Delhi, India. Currently for the most part I work as a Technical Consultant developing Open Source ICT solutions for social and societal inclusion. I am a a FOSS enthusiast, I want to create an awareness about FOSS through the work I do. Below are the latest updates from a some social networks I subscribe to.

Howto forward a WordPress Page to an external URL!!!

Sometimes we may need to forward a WordPress page to an external link/page… Since there is no option to do this in the page itself you have to use a page template, this is the way to do it…

  1. Lets say i want to forward it to twitter.. ;) Create a file lets call it re-twitter.php with the text below and save it to your theme folder (/public_html/wp-content/themes/<yourtheme>/re-twitter.php)
    <?php
    /*
    Template Name: Redirect Twitter
    */
    
    header('Location: http://twitter.com/itsAnimesh');
    die();
    ?>

    If you plan on making more redirects the file name starting in redirect will ensure they all stay together.

  2. Create the page, and choose the ‘Template Name’ Twitter Redirect.
  3. Save, done, test, done.

NOTE : If you change your theme you’ll have to move the redirect page templates…

I know there are plug-ins for this but i like this way better than using plug-ins or playing around with .htaccess. :)

Thanks for Reading... Please Post Your Comments Below

  1. Jpsy says:

    At least on a current WordPress system (I tested on the hosted version at wordpress.com) this info seems to be rather outdated. WordPress can do it on its own:
    Create a custom menu, and combine WordPress pages and external pages (“Custom Links”) in it as you like.