Support » Fixing WordPress » Page template to link to other pages

  • Resolved davestewart


    I’ve seen the topic of linking to “static” pages come up a few times, but this is slightly different.

    My WP enabled site is here:

    On the top right, I have 3 links, and the bottom one “Latest developments…” links to the archive of “Development”.

    Basically, it’s a standard page template, and the content is just a javascript that changes the browser’s location.href to the permalink of my “Development” category.

    To me, this screams “HHAAACCCKKKKKK!!!!!!”, and I feel dirty. Plus, there’s an annoying pause as it loads the first, then the second page.

    Is there a better way to do this?

    I have one idea:

    1. I enter the url I want to redirect to as the page content, in this case ‘’.
    2. Then in the page template, I just grab that value and then output it as part of a PHP location header:
      $link = the_content();
      	header("Location: $link");

    I think it all sounds very logical, but am I doing my usual thing and over-engineering here because I don’t know wordpress well-enough?


Viewing 1 replies (of 1 total)
  • Well I just went ahead and did it, and it couldn’t be easier.

    • I just stick a URL in the Page Content area
    • Set the template as Page Redirect
    • Publish


    More info and download is here.

Viewing 1 replies (of 1 total)
  • The topic ‘Page template to link to other pages’ is closed to new replies.