Page Links To

This plugin allows you to make a WordPress page or post link to a URL of your choosing, instead of its WordPress page or post URL. It also will redirect people who go to the old (or “normal”) URL to the new one you’ve chosen (301 Moved Permanently redirects are standard, but you can choose a 302 Moved Temporarily redirect if you wish).

This functionality is useful for setting up navigational links to non-WordPress sections of your site or to off-site resources.

You can also use it to create a hand-crafted menu that links to pages, posts, categories, or anything within your site.

Download

Latest version: Download Page Links To v2.3 [zip]

This plugin has been downloaded 165149 times.

Installation

  1. Upload the page-links-to folder to your /wp-content/plugins/ directory

  2. Activate the “Page Links To” plugin in your WordPress administration interface

  3. Create (or edit) a page or a post to have a title of your choosing (leave the content blank)

  4. Down below, in the advanced section, find the Page Links To widget and add a URL of your choosing

  5. Optionally check the boxes to enable link opening in a new browser window, or 302 Moved Temporarily redirects

  6. Save the post or page

  7. Done! Now that post or page will point to the URL that you chose

FAQ

Q. How do I make it so that a page doesn’t link to anything? I’d like to use it as a dummy container.
A. Just use “#” at the link. That won’t go anywhere.

Q. Can this be used to repoint categories to an arbitrary URL?
A. Not at this time. I’m considering it as a future feature.

Q. My links are sending me to http://myblog.com/www.site-i-wanted-to-link-to.com … why?
A. If you want to link to a full URL, you must include the http:// portion.

Q. Can I link to relative URLs?
A. Yes. Linking to /my-photos.php is a good idea, as it’ll still work if you move your site to a different domain.

Changelog

2.3

  • Fixed a bug with current menu item highlighting

2.2

  • Cleanup
  • compatibility tweaks to interoperate with a few other plugins
  • prompt http:// and auto-add it if a URL starts with “www.”

2.1

  • WordPress MU compatibility for when switch_to_blog() is used… it now uses $blog_id to keep their caches from stomping on each other

2.0

  • Allow one-character URLs so that things like “#” (dummy link) are possible

1.9

  • Fixed “open in new window” functionality

Donate

I’ve spent a lot of time writing this code and supporting it. If you derive some benefit from this code, please consider showing your gratitute in a more tangible
way. Thanks!

I have received $10.50 this month for my coding efforts.

Donate with PayPalAmazon.com Wishlist


914 Responses to “Page Links To”

  1. Mike says:

    Great plugin, but the current_item class doesn’t appear to be working. The version release notes say “…menu item will get the current_item CSS class…” but I’m not getting it for pages or categories. Am I missing something?

    I’m using WP2.7.1, no other plugins, and an unedited Sandbox theme.

    Thanks!

  2. Chad says:

    The plugin has worked well with Wordpress-MU. The only modification we needed to make so far was in the function txfx_filter_links_to_pages. There was no need to have the $post passed in as a second argument (the add_filter call to this function needed to have its last parameter of ‘2′ removed also). This was clashing with the current blog’s post ID’s if they happened to be the same ID. Instead we just declared global $post in the function and all was well.

    Thanks

  3. Chad says:

    Correction to above…
    The problem was with the cache, since the id’s were cached and an id could be the same across blogs. For anyone else attempting to shoehorn the plugin into WPMU, just be sure to prevent calls to the cache or instead modify what’s cached.

  4. dale says:

    I use wp ver. 2.7.1 and this worked like a charm to link to other pages. However, inorder to get it to work properly I had to create new pages, as the url would get tacked on the end of my blog url if I tried to edit a page.

  5. [...] Page Links To – by far the simplest plugin on this list, This plugin allows you to create “pages” that link to something else. It’s the easiest way to add links to your main menu, without mucking around in code. It’s good for adding a link to an external photography portfolio, for example. You could also use it to link to sections of a page, rather than an entirely seperate page, which could be useful for linking to sections of a restaurant menu, or other small sections of a larger page. by Mark Jaquith [...]

  6. [...] แต่คุณสามารถใช้ ปลั๊กอินเสริมที่ชื่อว่า ‘Page Link To’ ช่วยได้ โดยสามารถ Download ได้จาก http://txfx.net/code/wordpress/page-links-to/ [...]

  7. John says:

    Any solutions to the custom fields issue with 2.7? I.e.- Opening in another window?

  8. PEte says:

    Great plugin, I have used it to direct a post to one of my pages and it all works. However, the page in the Navbar does not become highlighted in the same way as if I had clicked on it – is there a way to mimic this?

  9. Jurawa says:

    Just wondering how to implement the opening of links in a new window. help would me much appreciated

  10. [...] Page Links To is used to redirect certain older posts or pages to newer posts or pages. I use this for a few pages, though you’d never see it as everything happens behind the scenes. [...]

  11. A_Flama says:

    Very HELPFUL!!! Thanks a bunch :D

  12. Andy says:

    Just tried this and it works well, the only issue I have found is that if you remove the URL it doesn’t revert to pointing at the post page. I found commenting out the following on line 94:

    && isset( $_POST['txfx_links_to'] ) && strlen( $_POST['txfx_links_to'] ) > 7 )

    sorted this. Was this intended functionality?

    Andy

  13. handre says:

    hi

    great plugin!thanks a mil.

    my questions is:

    is it possible to do the same for a category.
    i.e category links to

    i would like the category to link to a new page once clicked?

    thanks

  14. [...] Page Links To « WordPress Plugin 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.) (tags: plugins wordpress) [...]

  15. alastio says:

    Hello,
    I would know how to target the links to a new window or tab. I tryed to write “links_to_target” in the meta box of the page but it doesn’t work.
    Thank you.

  16. Lior says:

    Great Plug-In, thanks.

    I would like to make a feature request. I’d like to link to wildcards. In my specific case, I’d like a ‘Current Issue’ link to point users to the current date in the format /%year%/%month%/

    Would you mind adding that feature to the plug-in? I would be happy to help and put in some programming work if you point me in the right direction…

    Thanks again.

  17. Christer says:

    Hello, I am having a problem with the plugin. When I click the link of the page that I created, it puts the WP url and then the a url of the page I want it to redirect to. I’m curious what I did wrong. Thank you for any help.

  18. Christer says:

    aw man, got it. I forgot to put http:// in front.

  19. Awesome plugin! Kudos to John (above) who pointed me in the direction for it! I have his same question:

    Is there a way to get the links to open in new tabs or windows?

  20. Malte says:

    Hello there,

    thanks for the great plugin! But i am asking myself if there is any way to get that link_to_target option working?

    Greetings,
    Malte

  21. Hayden says:

    to get it to open in a new window add a custom field (besides the links_to one) called links_to_target and give it the value _new

  22. Malte says:

    I tried it that way a lot of times, but it is not working (its still opening in the same window). I’m using WordPress 2.7 .. is the plugin maybe noch compartible with this version?

  23. [...] Page Links To – If you want to create a main navigation link that goes to another website, this is the easiest way to do that. [...]

  24. Bruce says:

    I successfully downloaded the plugin and tested it on my nav bar and it worked perfectly!

    I did that as a test and then I deleted the page that I added the page link to.

    Now I get “page not found” on my main posts page. Is there any way to retrieve that section of my blog? All posts are intact in the admin panel, it just does not show in the blog main page.

  25. Arnie says:

    Fantastic plug-in. As with many other comments, my main problem is that once when a page tab is clicked, it does not become active. The Home tab stays active. Has anybody figured out a fix for this? Thanks.

  26. fretbuzz says:

    I continually get an error when I edit pages in admin. The error message runs vertically at a 3 character width and says:

    Warning: Illegal offset type in /xxxxx/xxxxx/wp-content/plugins/page-links-to/page-links-to.php on line 106

    any Idea what’s going on here?

    Like I said, this happens every time I update a page with quick edit on the Page admin.

  27. Jesse Hawks says:

    I just want to say thank you I have been looking everywhere for this and have been trying to edit my CSS code to no avail I think thats worth buying thank you.

  28. Amod P says:

    Here’s what many of us were looking for: to open a link in new window, create another custom field called links_to_target in “Add Custom Field” and in the value type _blank.

  29. Malte says:

    @ Arnod P:
    Thats not working for me..

  30. discipolo says:

    i second mikes question:
    pages correctly get the current_page class,
    but when i link to a category(archive) it does not appear as current_item…
    also using wp 2.7.1
    any hints?
    greetz D

  31. mohsin says:

    i just installed this plugin but nothing happened..i am a newbie and unable to activate my external links

  32. Michelle says:

    Ditto, issues with links_to_target on WP 2.7.1.

    Thanks for the fantastic plugin, though! This is so needed in the core… :)

  33. [...] Page Links To maakt het mogelijk dat je eeen menu knop maakt naar een onderdeel buiten je WordPress site. Denk [...]

  34. Mark says:

    I’ve updated the plugin! Check out version 1.7 and see if it fixes your issues (note: WP 2.7+ recommended — it may work with 2.6.5, but I’m not promising anything!)

  35. ultras says:

    I upgraded from Page Links To 1.6 to 1.7 and I cannot anymore to delete link from page. I want to restore page to default wordpress link and after I press Update Page nothing happen.

  36. Michelle says:

    Mark, thank you! The opening in a new window thing seems to work now in Chrome, FF and IE. Thank you!

    I too am running into the problem @ultras described, though – I can’t delete the link out of the custom field – it keeps coming back after I save the page. Not a huge deal as I can obviously create a new page and delete the old one, I just thought you’d like to know.

    Thanks very much for your wonderful plugin!!

  37. Kevin Klein says:

    I’ve used this plugin successfully in the past, but with the latest build of WP (Version 2.7.1) and the Page Links To meta box is not appearing on the Page edit interface…not sure what is happening.

    Can I add this key to Custom Fields manually?

  38. Very much useful plugins. Have been searching for this a long time…. Thanks…:)

  39. [...] Akismet All in One SEO Pack Audio player Featured Content Gallery Google XML Sitemaps Improved Include Page MapPress Easy Google Maps NextGEN Gallery Page Links To [...]

  40. Will says:

    Great plugin! But, having same problem with link not opening in a new window when I check the option box or try the custom field. Using v1.8. Any help would be greatly appreciated. =)

  41. [...] for this is to have all traffic going to http://www.articulatedsky.com, automatically diverted (via the Page Links To plugin) to the location of the page to create a fake front page. The blog link on this page will seem like [...]

  42. Tobias says:

    Hi Mark!

    There also seems to be a bug with the redirect type.
    No matter how I set the checkbox, the page will be 302-Temporarily-redirected.

    I believe the if-test for $redirect_type is never fulfilled, because $redirect_type is an empty string, because the custom field does not exist (it gets deleted when the checkbox is not set).

    Tobias

  43. Mike Freeman says:

    Hey, GREAT plugin! I’m kind of new to WP, and I just spent about an hour troubleshooting how to make the link not include the Wordpress URL. I eventually figured it out! Thanks!

  44. mijou says:

    Hi,

    All right ,this is what i understand:

    1,Upgrade to WordPress 2.7 or higher

    From this point i understand nothing:(((

    You said:

    “Upload the page-links-to folder to your /wp-content/plugins/ directory”

    ok but how can i do that???????????????

    thanks

  45. Shoaib says:

    Fatal error: Cannot redeclare txfx_get_page_links_to_meta() (previously declared in /home/actionen/public_html/doitscience/wp-content/plugins/page-links-to/page-links-to.php:29) in /home/actionen/public_html/doitscience/wp-content/plugins/page-links-to/page-links-to.php on line 49

    Getting This ERror when i try accessing it via
    http://doitscience.com/wp-admin/options-general.php?page=page-links-to/page-links-to.php as it is not appearing in the menu.

  46. joshua says:

    Great plugin – but like the rest dying to see the target new window function working. I back-revved to v. 1.6 and tried the manual function there, but it’s still not doing the trick under WP 2.7.1

    thanks for the great work! looking forward to an update!

  47. [...] 2009.01.05   要讓網誌上方的「分頁」變成超連結的方法,可以採用 Page Links To 這個外掛是個絕佳的選擇,看過許多 WordPress [...]

  48. Matthias says:

    hi,

    wenn ich den Haken “öffne in einem neuen Fenster” setze, passiert nichts!?
    Kann ich auch den Link in meinem Fenster öffnen lassen?

  49. [...] Page Links To 1.8 NEW! 不知道網友們有沒有注意到網頁上方的「我的相簿」?那個連結是往picasa的,這個外掛的功能就是這樣! [...]

  50. [...] page Links To پست‌ها و صفحات را خیلی‌آسان، به آدرس موردنظرتان Redirect ‌کنید، موقت و دائم. خارج از سیستم وردپرس، یک گالری ساخته‌اید اما تمایل دارید گالری را با وبلاگ‌، یکپارچه‌کنید. صفحه‌ای میسازید، برایش‌اسم انتخاب میکنید، پلاگین به‌شما امکان‌میدهد، صفحه‌گالری خارج از وردپرس را جزو صفحات وبلاگ در دسترس بگذارید. [...]

  51. Christian says:

    If anyone comes up with a solution to how to open the url in a new window/tab, please post it here.

    I’ve noticed I’m not the only one who is hoping for something like this.

    Does anyone have any other solutions that they would recommend besides this plugin to achieve this objective?

    Thanks!

  52. Jimmy says:

    Installing Plugin: Page Links To 1.8
    Downloading plugin package from http://downloads.wordpress.org/plugin/page-links-to.zip

    Unpacking the plugin package

    Fatal error: Cannot redeclare class pclzip in /homepages/24/d197723901/htdocs/trainers/wp-admin/includes/class-pclzip.php on line 171

  53. [...] and install Page-Links-To plug in to your WordPress application: 1). Download page-links-to from http://txfx.net/code/wordpress/page-links-to/ 2). Follow the instructions to install. 3). From the admin panel (/wp-admin/), make a new page with [...]

  54. [...] Page Links To:將上方分頁按鈕加入直LINK網址的功能,你可以直接指定分頁可直接連結到哪個外部網頁。 [...]

  55. Emmanuel says:

    I just installed your plugin and I must confess, I really love it. My theme did not come with a “home” link so your plugin gave a fast easy option.
    ;)

  56. [...] plugin de wordpress Page-links-to en lugar del script redirect.php (ahora hay que copiarlo por cada [...]

  57. vrob says:

    It’d be nice to be able to edit the title attribute of the link.

    Thanks for your plugin!

  58. Hostscorpion says:

    hi

    I emailed you but no reply… I installed the plugin and created a page linking to http://www.hostscorpion.com/advertising.jsp

    but gets nothing found error… plz help me plz

    thanks

  59. Stephen says:

    Nope, not working for me on WP 2.7
    I’ll have to try something else.

  60. Albert says:

    I have installed the plugin and it works perfect. Only, i have checked the new window option and the post opened in the same window.

    Do i something wrong

    With kindly regards,
    Albert

  61. Joseph says:

    Best plugin ever!

  62. User says:

    Hi .. this plugin makes all my respond links go to the link I choose .. example

    http://url.com/#respond .. instead of making it an individual archive on my site so users can comment. How do I make this change?

    Thanks

  63. [...] Page Links To – 本文最简单易用的插件。该插件允许你通过创建“页面”来链接到任何你想要的位置。不必修改代码就能轻松为主菜单添加链接。例如:链接到您的外部相册。您还能通过它创建链接到页面的指定位置,对于制作饭店菜单或大幅页面的小区域链接将非常有用。作者: Mark Jaquith [...]

  64. [...] běží na vlastním engine (CPG) a má vlastní adresu. Wordpress to neumí, ale našel jsem Page links to plugin, který umožňuje při založení nové stránky definovat url, na které bude stánka odkazovat. [...]

  65. [...] site to appear. Google XML Sitemaps – to inform search engines of new updates to your blog. Page Links To – allowing you to point any posts and pages to a URL of your choosing, this is a must have if [...]

  66. [...] when I came across this plugin that does exactly what I want. It is called ‘Page Links to‘ plugin. Now at the bottom of the page there is the ‘Page Links to’ option. Works [...]

  67. [...] Page Links To – This plugin allows you to point a post or page to any URL you want. Very useful if you want a WordPress Page to link an external URL. [...]

  68. mondmond88 says:

    great plugin i must say
    but currently im facing another problem
    when i create categories, i wanna link the categories to another page?
    can this be done with page links to?
    or do you know any plugin that can achieve it?
    thanks
    hope to see your answer in my inbox soon
    thanks again

  69. michael says:

    What a godsend! I was rackin’ my head over trying to modify the page code to call in the page id’s. I wanted to replace category post links with page links. Your plug-in rescued my insanity. Thank you!! – (site url is temp until site goes live.)

  70. Andy says:

    Hi, great plugin, used it before…. but no links opening in a new window on the latest version, with 2.8 anyhow.

    Any chance of a update on this or anyone with a mod that’ll do it?

    Thanks for all your work on this.

  71. Amanda Soehl says:

    With Wordpress 2.8 the open in new window box option is not appearing. has this been resolved??

  72. I would like to use this plugin for blog posts in order to link the headline directly to the source I am discussing in the post (very much like link posts on Tumblr and Daring Fireball work). But could you add an option for displaying some kind of special character in the headline or elsewhere in the post to designate it as a link post? Otherwise, visually, there is no distinguishing these posts from others, so readers do not have a visual cue to click on the headline.

    Thanks for a great plugin. FWIW, I donated.

  73. Google Voice says:

    Great plugin! I’m a Joomla veteran but WP newbie, this will go into my “must have” toolbox. Do need a plugin for the forums I’ll have on my site and also my other site will need a gallery so this plugin is perfect! Thanks, you deserve a donation. Will donate next paycheck because I’ll be using this plugin often.

  74. Michael says:

    Hi Mark,
    Thanks so much for your work on this plugin. Much appreciated.

  75. eric says:

    downloaded and activate the Page Links to plugin. It allows me to link to other site won’t link to internal html files in my appropriate theme folder. I’m using wordpress as the blog and html files as the website which I’ve placed on my server and would like to like to.

  76. Frustrated says:

    Apparently something had changed in this plugin in 1.5+ which prevents using a “#” in the url for a page which is a parent of child pages and which you do not want people to be able to access.

  77. Alex says:

    Hi, can I use this plugin for a Category? not just for Page or Post

  78. Bob Murray says:

    Hi there Mark – just wanted to add my thanks to you for this terrific plugin. Couldn’t be simpler to augment/amend the navigation menu using this. Incidentally, I have just used this on an Artisteer theme which outputs it’s own php code for the nav menu (doesn’t seem to use ‘list-pages’) – and it worked perfectly. Got me out of a hole with a client in fact – so thanks again!

  79. [...] This plug in also features an 302 redirect option and the ability to open in a new window. Visit: Page Links To and show some love by making a small donation for this simple yet elegant plug [...]

  80. [...] Page Links To – This plugin allows you to point a post or page to any URL you want. Very useful if you want a WordPress Page to link an external URL. [...]

  81. K says:

    Anyone else having trouble getting pages to open in a new window? I’m using WP2.8.2 with v1.8 of this plugin.

    • Robin says:

      I have similar problem, can’t open links in new window. I use WP 2.8.5. & plugin version 2.1.

    • Pope says:

      The plugin has worked magnificently until lately. I am using WP version 2.8.5

    • ttweb says:

      Try the Download this way: WordPress Dashboard / Add Plugins / (search) Page Links To / Install. It’s the 2.1 Version, “Open in new window” works.

    • Nengqs says:

      I Install the 2.1 Version But It not open in a new window?
      I am using WP version 2.8.6
      can you help me? how to fix it.

      • Laurent (subscribed) says:

        I am having exact same issue. WP 2.8.6 and Page Links To 2.1. “open in new window” doesn’t work.
        Installed plug in via WP Add new Plugins (WordPress Dashboard / Add Plugins / (search) Page Links To / Install.)

        • Laurent (subscribed) says:

          I reply to myself. I found in the Wordpress forum the solution that works for me:

          “Posted by: jmbullis

          Looked into this issue more and they found a fix that will be showing up in the next version. Thanks go to a dev named “Head”.

          Simple workaround is change

          from:

          add_filter( ‘wp_list_pages’, ‘txfx_page_links_to_highlight_tabs’);

          to:

          add_filter( ‘wp_list_pages’, ‘txfx_page_links_to_highlight_tabs’, 9);

          in page-links-to.php at about line 197.

          I made the changes, activated all in one, and poof, it works.”

          It works for me right away!

  82. Connie says:

    This looked like such a sweet plugin. I just installed the most current version on 2.7.1 WP, and it created a 500 server error. Since I could no longer access any of the other plugins, I removed it and used the redirect code instead which works fine, but not quite what I was looking for. Any ideas why this would happen?

  83. Toby says:

    Please Help…..

    This is a great plugin thanks – however I really need to use the function that I have seen talked about where putting a # means that a parent page is then deactivated, allowing me to sturcture my menu like a proper CMS without each menu item being clickable. I know this was possible in earlier versions. Any ideas or suggestions how I can get this to work now?

    THanks

    Toby

  84. Shekira says:

    Hi great plugin! I’m using WP version 2.8.2 and the latest version of the plugin. I have the box checked “open in a new window” but for some reason my links do not open in a new window. Am I missing something?

  85. Axel says:

    Hi. I cant’t seem to get the open in new window checkbox to really work :(

    Anyone else having this problem?

  86. Jill says:

    Same here. Can’t get the open in new window checkbox to work either. Am using WordPress 2.8.2 with v1.8 of this plugin.

Leave a Reply

Note: If you are replying to another commenter, click the "Reply to {NAME} →" button under their comment to help the conversation have a better flow!

Anti-Spam Quiz: