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 141647 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 $0 this month for my coding efforts.

Donate with PayPalAmazon.com Wishlist


895 Responses to “Page Links To”

  1. ShaolinTiger says:

    Yah am having same preg replace error after upgrading to 2.2, commented out line 186 an it works fine (the line is not relevant to functionality only to styling for tab highlighting).

  2. On the current release, you forgot the delimiters for the preg_replace on line 186. It should probably read something like this.

    $pages = preg_replace( ‘|

  3. <a href="' . $current_page . '"|', '
  4. <a href="' . $current_page . '"', $pages );
  • Lewis (subscribed) says:

    You’ve got a bug. I get this:
    ]: Unknown modifier ‘<' in /home/lewislev/wintercove.org/wintercove/wp-content/plugins/page-links-to/page-links-to.php on line 186

    Archive for the ‘Workpapers’ Category.

    I have a page which links to a categories archive of the same blog. It's done this with every theme I try.

  • Viorel says:

    function.preg-replace : Unknown modifier ‘<' in /home/teletrei/public_html/wp-content/plugins/page-links-to/page-links-to.php on line 186

    I have this error with the new plugin …

  • Dave (subscribed) says:

    Hi,

    2.2 seems to have a bug alright. I upgraded and lost all my tabs which I use for redirects on my theme?!

    No errors, just tabs disappeared.

    Had to manually remove and reinstall an earlier version with no issues.

    Fantastic plug in, hopefully this can get fixed up!

  • Rika (subscribed) says:

    I received an error when I click on that link:

    ]: Unknown modifier ‘<' in /home2/…./public_html/fotolog/wp-content/plugins/page-links-to/page-links-to.php on line 186

    What seems to be the problem after updating the plug in?

  • Asdoo says:

    After installing the upgrade of “Page Links to” plugin, the Page Menu Bar is gone from my home page.
    How can I fix this?

    My WP home page is http://www.massimilianoeleota.com/directory/WP/

    Thank you,

    Max

  • substitute says:

    AUTHOR please upload the previous version in order to downgrade.
    I’ve done that since I always keep a vesrion of all my plugins.
    So I just reinstalled the former version.
    Works like a charm…

  • Steve Keys (subscribed) says:

    New Release wiped out my menus. Had to put old release back in.

  • Kasper (subscribed) says:

    My header menu disappeared after upgrading to 2.2…. possible to get an older version of Page Links To, so that i can make it work again?

  • Matte says:

    Where can I get a copy of the old 2.1?!
    2.2 screwed up my menu!

  • Kyle (subscribed) says:

    Hello,

    I upgraded and now there seems to be a problem. I uninstalled and re-installed and it won’t install. It says there’s an API error.

    Sorry to leave a bummer comment =(

  • Josh Brage (subscribed) says:

    the update does not work with my site, breaks my top navigation.

    can you email me or link me back to 2.1, that does work? ASAP

    thanks!

  • Erik (subscribed) says:

    Great plugin but ever since your last version I am getting a:

    “Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘<' in /home/erikhaus/public_html/wp-content/plugins/page-links-to/page-links-to.php on line 186"

    This shows up on the page I have this post pointed to.

  • SteveP says:

    Interesting… After this upgrade to 2.2 I had to modify line 186 to include a delimiter for the preg_replace() call. I used the pipe symbol as was used on line 185 and it made it happy again.

  • Klark (subscribed) says:

    I upgraded from an earlier version and then started having problems. Specifically, all new pages in WordPress included “http://” for the “Point to this URL:” value. To get a page to work right, the author had to remove this value.

    I reverted to 2.1 and all is well.

  • DJ NightLife says:

    I’ll downgrade to 2.1 because it made completely disappear my Pages menu…

  • Pankaj Batra says:

    Replace line 186 with following line
    $pages = preg_replace( ‘|

  • <a href="' . $current_page . '"|', '
  • <a href="' . $current_page . '"', $pages );
  • Reply to Pankaj Batra →
  • substitute says:

    just rewrite the code.
    I am amazed though that as a consultant and a plugin writer you did not thoroughly tested prior to release. Something that big can not go unoticed!

  • Francine (subscribed) says:

    The latest update for the plugin (2.2) caused an error in my page navigation. On most pages it looks fine, but I have a few places where I have pages set up to link to category archives, and when I am viewing the category archive, I get this warning:

    Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘<' in /nfs/c04/h03/mnt/65039/domains/mominventors.com/html/wp-content/plugins/page-links-to/page-links-to.php on line 186

    in place of my normal navigation items. This only affects pages in the top navigation when you're viewing a page that's being linked to with the Page Links To plugin.

    Reinstalling 2.1 solved the problem.

  • Álvaro Degives-Más (subscribed) says:

    Yay! That navigation menu item thingamabob issue is solved in 2.3. Thanks for the quick fix Mr. Jaquith!

  • Bill Messick says:

    Thanks for the quick fix on the menu bug in 2.2, that bug had me running around trying to figure out where my menu went. 2.3 seems to be ok now, nice job:)

  • Frank (subscribed) says:

    So, I was successfully using this plugin to create pages that populated with posts from a particular tag by assigning “Page Links To” to something like /tag/XXXX.

    Then I updated the plugin and now I get an error. To see what I mean, go to http://www.52teas.com and click on “Accessories” in the top navigation bar. Can you help?

  • cory says:

    THANK YOU SO MUCH! I was trying to use a custom redirect.php file on my blog but I have custom permalinks and nothing would work. This works perfectly. Thank you.

  • Jessica (subscribed) says:

    Hello, I was trying to install this on my wordpress, I am running the latest version of wordpress and your latest version of the plug in, and I got the error stating: Plugin could not be activated because it triggered a fatal error. Any ideas? Thanks.

  • nomos (subscribed) says:

    Hi,

    the plugin works fine, but the “open in a new window” dont work…??

    I uses
    WP: 2.8.6
    PageToLink: 2.3
    WP-Menu: 0.2.6
    (http://www.vizioninteractive.com/products/wordpress-plugins/wp-menu)

    have you any idea??

    Thanks

  • Erwin Odendaal (subscribed) says:

    Version 2.3 still doesn’t open pages in a new window. (All the titles on this page should open in a new window.)

  • Dave (subscribed) says:

    Well done for the fix! And thanks for making life a little better by creating this plugin and maintaining it!

  • NHenriquez (subscribed) says:

    I have installed the pages-link-to folder to the wp-content/plugins and when I activate it in wordpress it says “Plugin could not be activated because it triggered a fatal error.”

    Any ideas why and how to fix this?

  • Doug (subscribed) says:

    Great plugin!
    Is there a way that I can add a “rel=” tag to the links? For example, if I wanted the target to open in Lightbox on the same page…

    Thanks!

  • Erwin Odendaal (subscribed) says:

    Has there ever been a version which opened links in another window? Does this version work with WP 2.9 and can I download this plugin somewhere?

    http://www.zijnsorientatie.nl (all titles (in bars) must open in new window (but they don’t)

  • [...] make the “Start the Workshop” tab show in the menu, I installed a plugin called “Page Links To” (I use it here, too, to put Madison’s blog and Open Adoption Support appear in the [...]

  • Wilson (subscribed) says:

    I just installed v 2.3 in my WP 2.7. It breaks my navigation bar and replaces it with a fatal error like below:

    Fatal error: Call to undefined function esc_url() in /home/…/wp-content/plugins/page-links-to/page-links-to.php on line 134

  • [...] The missing piece was the plugin “Page Links To”: http://txfx.net/wordpress-plugins/page-links-to/ [...]

  • My fiancee

  • Ben Huson (subscribed) says:

    Hi Mark,

    A very useful little plugin, love the way it works simple by changing the permalink value for the page – very fast solution with little overhead.

    I have a little bug though…

    Running version 2.3 with WordPress 2.9.1

    Plugin working fine, setting a link in the “Point to this URL” field and saving the page. However, it doesn’t seem to remember the link (as I’m sure it used to in previous versions?) so if you went in to edit that page and save changes, the permalink defaults to being the correct page permalink, not the redirect. I don’t think it is clashing with any other plugins but let me know if you have difficulty replicating the problem.

    I’m not sure if this is intentional as if you edit the page and save changes you probably don’t want that page to redirect. However, if you have had to specify a redirect, I think you should actively have to remove the redirect rather than it automatically happening if you update the page.

    Reasoning: I had a page that was redirecting whilst I was updating the content for that page. I wanted the page to continue to redirect while I was editing and saving changes to the page.

  • Steve (subscribed) says:

    Great Plugin – however major issue still not being addressed.

    OPEN IN A NEW WINDOW OPTION – I cannot get it to work, please help.

    Is there anyway to bypass this option and change the script to make all links open in a new window by default?

    How would I edited the script to do this ?

    Thank you.

  • infilmity says:

    i want to report something.
    when i use quick edit post, there is an error comes out, and make me wait for a long time:

    =====
    Warning: Illegal offset type in /home/infilmityc/domains/infilmity.com/public_html/blog/wp-content/plugins/page-links-to/page-links-to.php on line 133
    =====

    after i deleted the 133 + 134 lines, error disappears.

  • Jai (subscribed) says:

    I also can’t get the OPEN IN A NEW WINDOW OPTION to work. Any ideas? Is it just me? Running WP 2.9.1 with plugin version 2.3

  • JR Rozko (subscribed) says:

    What would be the html syntax I would use in order make a link to the page I am using this plugin on go to an anchor on that same page?

  • Kim (subscribed) says:

    Your plugin is just what I’m looking for. But I’m having a small problem. When you click on a tab, it goes to the categories but says “Archive for the ‘Recipes’ Category”. How can I stop it from posting this and just list the posts? Seems like it should go to the categories and not the archive…
    Thanks!

  • Mario (subscribed) says:

    Great plugin! But the link don open in a new window!
    I also had a quiestion.. can i suse links to my network,
    ex: \FILEACounterbookLIBRARYUserFilesBK ?

  • 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: