Page Links To
About
Page Links To is a plugin that allows you to make certain WordPress pages or posts link to a URL of your choosing, instead of their WordPress page or post URL. It also will redirect people who go to the old (or “normal”) URI to the new one, using a redirect style of your choosing (302 Moved Temporarily is standard, but you can enable 301 Moved Permanently redirects i f you wish.)
For instance, say you have a photo gallery installed, but can’t be bothered to integrate it into WordPress. You’ll still probably want to have a link to it from your WordPress blog. With this plugin you can create a new page called “Photos,” and point it to the URL of your photo gallery. “Photos” will show up when you use wp_list_pages();, but instead of linking to the (blank) “Photos” page, it will link you your photo gallery!
Another usage scenario is that you have content that was on a post, and want to move it to a page. You could redirect the post to the new page. And if you use a 301 redirect, search engines will eventually “find” the new location and change their links.
This plugin uses only two simple MySQL queries, no matter how many total pages or Page Links To enabled pages you have, so you don’t have to worry about scalability.
Usage
To redirect a page or a post, scroll down to the “Page Links To” section on the edit screen for that entry and enter in the URL you want to redirect to. If you want this to be a permanent move, you can additionally add a Custom Field of links_to_type with a value of “301″ (without the quotes). After saving the entry, the redirect will be active!
New in version 1.3: Now you can create a links_to_target meta key, and provide the target you would like for the link (like _new, to open the link in a new window). The target you choose will be used in wp_list_pages().
Download
Instructions
page-links-to.php to your /wp-content/plugins/ directory Activate the “Page Links To” plugin in your WordPress administration interface Create (or edit) a page to have a title of your choosing, and a parent page of your choosing (leave the content blank — it won’t be used) Down below, find the Page Links To meta box and add the URL you’d like it to link toThat’s it! Now, that page will link to the provided URL instead of its WordPress page URL.
Possible Uses
/archives/tags/, but want “tags” to show up on the top level) Adding a link to your blog’s front page without having to modify your template and hack it in manuallyLeave any bug reports or feature suggestions here in the comments.
Versions
links_to_target, tab highlighting moved to WordPress 2.0 style 1.2 If you link to an internal WordPress page, like a category, the menu item will get the current_item CSS class when you’re on that page 1.1 Posts can have redirects, can specify redirect type (301/302), get_permalink() is filtered for posts. 1.0 Initial public release.

Using links_to in 2.5 not the same as in 2.2
I just upgraded one of my sites from version 2.2 of Wordpress to 2.5 and am confused. I wrote a page and wanted to use my Netflix RSS on that page, I went down the extra features, saw the drop down for links_to and pasted the RSS link in, previewed the page and nothing. Went into my Plugin settings, activated v1.4 of links_to and previewed the page and it worked.
1st question, is links_to built into 2.5 or not and if so why so I have to use v1.4 of the plugin to get it to work?
2nd question, when I display that page, I get a new window of my Netflix queue, did this with a few other sites and the same thing.
How do I embed the linked site so that’s it’s displayed within my wordpress and the user doesn’t end up on another site?
FYI, I do have Netflix working as an RSS Widget, but I would prefer to have it as a page so that there are descriptions etc.
Miguel
Brilliant plugin. It’s saved me so much time
Hi Mark,
Your plugin is really great, but could you PLEASE say something about it working with Wordpress 2.5? (it doesn’t right now)
Are you planning on an update soon?
Cheers,
Diego
http://www.secretia.com
Hello,
i have installed your plugin with WP 2.5 and it doesn’t seem to be working
Does aynone know about an alternative to this plugin or if it’s going to get updated ?
Thanks for your work !
Yes, it is not working in 2.5
But thanks anyway
Not working in WP 2.5 here either. Please update!
How is it not working in 2.5? It works fine for me (as seen on this site with my “Photos” and “Services” links).
It works fine for me on 2.5, too. (See the “My King” link on my blog.)
Thank you so much!
I’ve been looking for something like this for months! It’s so simple and easy to use!
Much love for San Jose, CA!
I have installed it on my site but I can’t see where I can use it when making a new page? Could someone please make a PrintScreen?
Cool little Plugin, very useful
hey,
what about adding the facility to add a meta ‘links_to_post’ and then quote the post id. Helps when you need to move the site to another server and domain or even to a sub-directory.
Very good plugin and works great on WP 2.5. Thank you very much for your work!
Thank you for taking the time to develop this plugin.
I have installed the plugin but when I go to create a new page I cannot find any reference to it in the templates. Please help.
Great plug-in! I have been searching for something like this for a while.
I have a question:
When I do a re-direct, I want it to open in another tab or at worst another window. How can I do this?
Thanks!
Perfect!
Excellent work in WP 2.5, this one’s a keeper
Yea.. it doesnt seem to be working for me either.. used firefox 2.0, then upgraded to firefox 3.0, and also using ie 6.0.. and none of them popped up into a new window.. for (markjaquith.com/) or (www.4-14.org.uk/) .. so.. im also using windows xp 64-bit ..
so i dont know if that has anything to do with it.
Anyway I can mask/hide the redirected URL so that my site’s address still shows in the Location bar?
Or as Miguel asked, “How do I embed the linked site so that’s it’s displayed within my wordpress and the user doesn’t end up on another site?”
Tq.
I guess I have the same question as Sandra. I can’t figure out what to set the links_to_target to get the page to open embedded in my blog. Any help would be appreciated, thanks for providing this plug-in.
Hey there, the plugin is pretty simple at usage. Lightweight and it worked effectively.
Find it hard to figure out what it does at first since it was named to “Page links to”. Thought it was used for linking internal pages.
Now I know what it is and I can link my blog with my other websites.
Thanks for the ultra cool plugin.
Frank did you figure the ” links_to_target ” tag yet?
Pretty simple, it’s like creating or hyperlink your link.
Once you created the “links_to and URL in the custom field. You need to create ” links_to_target ” in a new custom field with value ” _new “.
Your page will save by itself make sure the status Published is set first.
Check you page nav link and click on it. New page will open.
Easy pheasy!
Hope I answered that correctly.
I don’t know if I’m getting this right, but what’s the point of this plugin? I went in (without the plugin), created a new (blank) page for my Flickr library and added “links_to” in the custom field.
What else does this plugin do that I didn’t just do with the above method?
Or am I completely missing the boat here?
For some reason one of the pages I used this on has now replaced my 404 message. So whenever a link is broken the user gets redirected to another site, not the 404. Any ideas?
Wow and wow again…
I have the latest version (2.5.1) of Wordpress installed and this works great and just as described above.
In short for those who haven’t read properly the full text… Make a dummy page with title and add the Custom Field key lins_to with the URL as value and you have it up and running!
No editing themes/templates to add items to the menu so you can test and change easily. For me that is what really sells it.
Many many thanks.
Mike
I don’t know if I’m getting this right, but what’s the point of this plugin? I went in (without the plugin), created a new (blank) page for my Flickr library and added “links_to†in the custom field.
What else does this plugin do that I didn’t just do with the above method?
It changes the WP-generated link to your page to point to the URL specified by your links_to custom field. If you did it without the plugin, you’d just have a blank “Flickr” WordPress page that didn’t point to your Flickr library!
Hi Mark,
I still haven’t found the solution to embedding the redirected page within my wordpress. Any thoughts?
Den: The â€links_to_target†tag works great if you want the redirected page to open in a new window, but Frank and I want to embed the redirected content. Any ideas?
Thx!
Sandra,
What you want isn’t going to be feasible the way you want without using an
<iframe />or really geeky PHP code. Embedding and redirecting, although they seem similar, are very different, technically.Hey, I’ve had this plugin working fine until I took a page off, then went to add it again with the same value “links_to” and the URL.
When I click “View” in the manage pages tab, it goes to the URL I specified, but when I click the page from my homepage, it adds my domain name in front of it, throwing it off.
Anyone else getting this problem?
How can I remedy this?
Thanks in advance!
EDIT: Okay, so it seems every link I add now, adds my URL in front of it.. anyone know what’s going on? =S
ok, Mark. i’ll go look for iframe/embed plugins then. thanks anyway. =D
Hi,
I am creating a new design for my website with .active highlighting tabs … When I redirect a page to a category using this fantastic plugin the highlighting disappear, and the page seems ‘non-active’. The correct category appears, though … Can someone help me with this please?
Thanks!
It definitely works in 2.5.1 for me
It works in the latest version of WP (nice!) but one thing I don’t like is when I click the comments link for any of my posts, it breaks. It’s looking for:
http://www.posttitlelink.com/#comments
Bug: “Illegal offset” on line 95
Fixed by Adding,
if(is_array($id)) $id=$id['ID'];
just below,
$id = ($post->ID) ? $post->ID : $post;
Very nice this last version 1.5 - but:
The “links_to_target”-Option works only with static pages not with posts.
Does anybody know why… Maybe the solution may be found in these lines:
WHERE post_id = ID AND meta_key = ‘links_to_target’ AND (post_status = ’static’ OR post_status = ‘publish’)
Thanks for helping
I’m sorry…I just can’t figure this out.
The initial links_to works great. If you click on a post that I’ve made look at the links_to, it opens up the re-directed link in the same browser.
But I’m looking for it to open in a different browser.
I’ve tried everything this site has recommended. I created a new links_to_target then in the value section, I put _new. Still nothing.
Any suggestions?
Just saw the new version 1.5 which the notes say
“Added WordPress 2.5 meta box — no more custom field-fu!”
What does this mean?
I just put the plugin in my 2.5.1 site and activated it. When I try to manage a current page or write a new page, I don’t get any sort of linking option anywhere.
Google Search “how to link wordpress page to a different website”: $0
Finding exactly what I’m looking for: $5 Donation
Not having to ask my husband for help because it was easy enough to do myself: PRICELESS!
My shop thanks you! :o)
~Marianne
Can the Page Links To - Point to this URL be a runtime generated link - or does it have to a specific URL entered there? In other words - generate a desired URL in php in the Page body and use the $url defined in the Point to this URL field.
What would be cool - is if you had a droplist of targets just below the entered link.
Thanks
Marianne, you rock. Thanks for the comment!
Thank you for saving me a load of theme hacking.
Whenever I try and link, it links me to the site I chose but under my own directory. mysite.com/wordpress/www.google.com
(If I linked to google.)
Help
I’m slightly confused… Under usage, you say, “To redirect a page or a post, scroll down to the “Page Links To†section on the edit screen for that entry and enter in the URL you want to redirect to.”
I have activated the plugin in the WP admin panel but when I go to the page I wish to edit in Manage>Pages, there is no “Page Links To” section. I have wordpress 2.51 btw and version 1.5 of your script. What might be my problem?
Hi Mark,
this plugin is one of the excellent plugin i ever see….
you really make my day happy…
thanks a million
ya i know you really deserve some cash for this…
take care
Mukarram
This should be implemented in the next WP build.
So great. Saved my project!
got it work a treat on my blog… cheers mate
Mark,
Thanks for your response! I just realized the stupidity of my question above. I’m using your plug in right now! Thanks so much for it.
Hey man!
Thank you very much for this excellent plugin. If I had a lot of cash Im going to send you some. Godspeed. You rock!
-Jp
Please delete this
Wow what a fantastic plugin, as soon as I get paid into my payoneer I definitely need to make a donation.
I did however try adding a # to the url cause I want to create pages which only act as place holders for subpages in a dropdown but that does not work.
Any advice?
Your plugin is amazing! I’m having a slight problem, unable to get links_to_new to work instead of links_to. links_to seems to overwrite it each time. Am I doing this wrong? Any help/walkthrough would be awesome!
Hey, looks like my last post disappeared. I’ve been unable to figure out how to use the _new feature. Every time i enter a website, it works fine, opens the other page as it should, but since the page i’m linking to doesn’t have a link back to me, I’d like to open it in a new window. The custom field shows “links_to” in the key, and the URL I am using in the value. I try to edit the key to “links_to_new”, but it’s overwritten with a new “links_to”. I feel I am doing this wrong, any suggestions?
Got it working in WP 2.6.1 but not in WP 2.5 guess there is some issue in combination with other plugins.
Will find out later why.