PDA

View Full Version : making a web page in wordpress point to an external page


mia_tech
10-15-2009, 11:51 AM
guys, how I could make a new page in wordpress point to another page in a different site?

mlseim
10-15-2009, 01:24 PM
Do you mean that the contents of the page are another page, with your
header and footer intact? Or a link to an external page that opens in a new window?

mia_tech
10-16-2009, 12:54 AM
Do you mean that the contents of the page are another page, with your
header and footer intact? Or a link to an external page that opens in a new window?

yes, a link to an external page, that either opens in a new windows or the same.

abduraooft
10-16-2009, 12:00 PM
http://htmldog.com/reference/htmltags/a/

mia_tech
10-16-2009, 09:15 PM
http://htmldog.com/reference/htmltags/a/

you post a link to the link tag <a> in html. I was looking for a way to do it in wordpress. I'm kind of sure there's a way, without going into the code. I'm still looking. I'll post when found.

Apostropartheid
10-16-2009, 11:47 PM
Creating a new page template and send a HTTP location header would be the way I would do it.

mia_tech
10-17-2009, 02:07 AM
Creating a new page template and send a HTTP location header would be the way I would do it.

could you elaborate a bit? it's been a while since I do any coding in php, html, css.

Apostropartheid
10-17-2009, 02:19 AM
Create a file in your wp-content/themes/whateveryourcurrentthemeis directory called something like external.php
Inside, put this:

<?php
header('HTTP/1.1 303 See Other');
header('Location: http://example.com/');
/*
Template Name: External
*/
?>

Then create a WordPress page using that template with no content and link to it.

mia_tech
10-17-2009, 06:22 AM
Create a file in your wp-content/themes/whateveryourcurrentthemeis directory called something like external.php
Inside, put this:

<?php
header('HTTP/1.1 303 See Other');
header('Location: http://example.com/');
/*
Template Name: External
*/
?>

Then create a WordPress page using that template with no content and link to it.


I got error
Warning: Cannot modify header information – headers already sent by (output started at

apparently for security reasons wordpress or the web server itself will not let you send more than one header(the one requested by the browser) to the client.