Page Lists Plus

Page Lists Plus adds customisation options to the wp_list_pages function which is used to create Page menus, all of which can be controlled through the dashboard. Here’s what it lets you do:

  • Change the link text in Page lists to something other than a Page’s title
  • Change the title attribute in Page lists to something other than a Page’s title
  • Remove title attributes from Page lists completely (which generally improves accessibility)
  • Remove specified Pages from Page lists
  • Unlink the current Page’s link in Page lists
  • Unlink specified Pages’ links in Page lists (N.B. this removes anchor tags, so can cause styling problems)
  • Disable specified Page links in Page lists using javascript (a fallback for cases where unlinking causes styling problems)
  • Add a “Home” link at the start of your Page lists
  • Add a “Contact” email link at the end of your Page lists
  • Add class=”first_item” to the first item in your Page lists (useful if you want to use a Page list as a horizontal navigation menu with a separator image before all items except the first)
  • Add a custom class to any list item in your Page lists (useful if you want some links to be styled differently from others)
  • Add span tags around or inside all list items or anchors in Page lists (again, useful for styling, particularly for creating tabs or using image replacement techniques)
  • Redirect links in Page lists to an alternative url (so to add a non-Page link to your Page lists, just create a blank Page and redirect the link to wherever you want it to go)
  • Add target=”_blank” to links in Page lists (so that they open a new browser window)
  • Add rel=”nofollow” to links in Page lists (to tell search engines not to follow the link, usually for SEO purposes)

To save space on your Write > Page and Manage > Page screens, you can set which of the Page-specific options will appear in the Page Lists Plus box there (by default, you’ll only see the “Alternative Link Text” and “Include in Page Lists” options). You can also set whether or not plugin data is deleted on deactivation (by default, it isn’t); if it is, then deactivating Page Lists Plus will remove all trace of it from your database.

You can download Page Lists Plus from the official WordPress Plugin Directory.

If you have any suggestions for features to include in future versions of Page Lists Plus, then please do email me to let me know.

34 Responses to “Page Lists Plus”

  1. baron Says:

    hi. Thanks for plugin

    perfect.

    Regards

  2. Rod Sherwin Says:

    Tim, if I uninstall alt link text and install Page Lists Plus will it use the existing data for alternative page titles etc?

  3. Tim Holt Says:

    Rod: Yes, if you switch from Alt Link Text to Page Lists Plus then you should be able to take your data with you. (I’ve just made the same switch on this site without any problems.)

    If you want to make absolutely sure, then the thing to check is the “Deactivation” section of alt-link-text.php file. Around about line 55 you’ll see a series of “ALTER TABLE … DROP …” statements. As long as they’re commented out, deactivating won’t delete any data.

  4. Matt Says:

    Nice plugin, thanks. It needed a bit of modification to get it to do what I wanted – remove the title attribute from links entirely. If anyone else is interested in doing this, change line 194 of the page-lists-plus.php from this:

    mysql_query(”UPDATE ” . $posts_table . ” SET alt_title_attribute = null WHERE ID = $_POST[ID]“);

    …to this:

    mysql_query(”UPDATE ” . $posts_table . ” SET alt_title_attribute = ” WHERE ID = $_POST[ID]“);

    And then just edit and update each page on your site that you don’t want to have a title attribute for in the menu.

  5. Matt Says:

    Hmm… Wordpress went and turned my dual single-quotes into a single dual-quote.

  6. workandtumble Says:

    Hi,

    I’ve posted this on wordpress.org but thought I should go straight to the horses mouth.

    First thanks for a great plugin!

    I’ve just run into an issue with subpages after shifting my WP2.7 install to another host.

    Where there is a re-direct set from a top level page to it’s first child page, the permalink of that child page gets added to url for all subsequent child pages.

    So:

    Tier1 redirects to Tier2a and then the links for Teir 2b become Teir1/Tier2a/Tier2b

    If I remove the re-direct or deactivate Page List Plus the issue goes away.

    Does you know of issues with the plugin or could it be database related – if so what tables or records need dumping?

    Cheers.

  7. Tim Holt Says:

    Hi workandtumble,

    Thanks for your message. I’ve emailed you an update of the plugin that should fix your problem. Once I’ve had confirmation from you that it does, I’ll upload it to the WordPress plugin repository so that anyone else that needs it can upgrade too.

    Cheers,

    Tim

  8. Tim Holt Says:

    Re: Matt’s post 4

    Page Lists Plus now includes an option to remove title attributes completely; it’s no longer necessary to modify the plugin to get it to do this.

  9. wordpressor2 Says:

    When I unchecked the box that removes the link of the page it also removed the original link formatting to become standard text. Meaning, in my navigation menu, where all the pages had nice white text, the unchecked box page, is now unformatted and all black — looking badly out of place. What sort of edit do I need to make in order to have that link revert to my standard style, yet have no link association? Thanks.

  10. Tim Holt Says:

    This is something that needs to be handled through your style.css theme file. For unlinked Pages to look the same as linked Pages, styling applied to your nav menu anchors also needs to be applied to your nav menu list items.

  11. workandtumble Says:

    Hi Tim,

    Love the plugin thanks again – one thing that’s an annoyance more than anything is that I have to set child pages to not show in the page list even if the parent is set not to.

    Food for thought for a future update anyway.

    Cheers, Gareth

  12. erikong Says:

    Hi, great plugin! One of the features mentioned is the ability to assign a custom class to any of the list item. However, I cannot seem to find this in the settings page. Hope someone could provide some inputs on this. Tnx!

  13. erikong Says:

    Re: Post 9 and 10.

    Can the reason why the style is messed up when you remove the link be due to the tags being totally removed? I was just thinking what if the tags were retained, and just remove the href attribute?

  14. Maitre Mo Says:

    Hi,
    And thank you for this plugin..!
    I use it to have sweets tiptitle on my pages titles, but since the last update wp to 2.8.1, nothing appears…
    Prhaps you already know it, but I wanted to be sure -and ask if you have a solution, of course..!
    Sorry for my english, and thank you anyway !

  15. Tim Holt Says:

    Re: Comment 12. This was a feature at one point, but I removed it because WP automatically gives every item a unique class, so I wasn’t convinced it was necessary. If you can explain why it’s needed, then I’ll put it back.

    Re: Comment 13. Yes, it’s because the anchor tags are removed. I’m considering adding an option to use javascript to disable the links while leaving the anchor tags in place, but will consider your alternative suggestion when I finally find the time to do this.

  16. Tim Holt Says:

    Maitre Mo> Sorry, I’m not quite sure what you mean. This site is currently on WP 2.8.1 and the tooltips when hover over links in the navbar seem to be working. Are you saying that on your site they don’t, or something else?

  17. erikong Says:

    Re: Post 13, I managed a simple workaround, by leaving the a tags and removing just the href attributes. This worked for 2 levels of navigation only. The parent (main) and then 1 level of drop-down menu.

    However, when I expand the menu now to 3 levels, where the first 2 are just category “place-holders” and the 3rd levels are the actual pages with links, there is a problem. The 3rd level pages all get the same page titles from the 2nd level title, and the links all disappear.

    Seems like there is a bug here? Hope you can point me to where or how I can debug this. Many thanks!

  18. Tim Holt Says:

    Removing href attributes from anchor tags results in malformed code, so I’m not particularly keen on pursuing that. Instead, the next release will add an option to disable links using javascript, which achieves the same effect but leaves the HTML intact.

    I stress that the preferred solution here should be to remove the anchor tags completely (as the plugin already does) and modify your CSS to make this work with your design. Leaving the anchor tags in place and making them non-functional will be supported from PLP 1.1, but with reservations and only as a last resort for those unable to sort out their CSS.

  19. erikong Says:

    Thanks for the info Tim. In the meantime, I found another workaround for this by specifying “#” in the RedirectTo field. So the link maintains the href attribute and does not go to a new webpage, although it scrolls up to the top of the window (which is ok for my case). Looking forward to the next release. Thanks!

  20. Tim Holt Says:

    Just a quick announcement: As of v1.1.2, the option to add custom classes to individual list items has been restored. Also, the option to disable links using javascript rather than unlinking them by removing their anchor tags has been added, which should help if unlinking Page links breaks your theme style.

  21. Big Mac Says:

    I have been finding pages where your plugin wasn’t working, and I think I have proved that it fails when the page title contains the “&” symbol! Were you aware of that?

  22. Tim Holt Says:

    This was an issue with early versions; which version are you using? Upgrading to the latest version should fix the problem. If not, as a workaround try replacing “&” with “&”.

  23. stevemagruder Says:

    I am experiencing the same issue as Maitre Mo using Page Lists Plus v1.1.4 in WordPress 2.8.4. And it used to work, although I can’t pinpoint the configuration where it worked offhand.

    Anyway, check out my blog at http://www.webcommons.biz

    As an example, “About” in the menu should have “About WebCommons” as the tooltip, but there’s no tooltip at all. There’s not any title attribute for this link. This also applies to all the other menu links. (Note: the first menu item, “Blog Home”, has a tooltip because it is hard-coded)

    Anyway, the About page was set up by giving it the page title “About WebCommons”, and then in the PLP field Alternative Link Text I have “About”. Also checked is “If this box is checked, then this Page will appear in page lists generated using wp_list_pages().”

    The above is a mystery to me because I have another site I’m working where this issue doesn’t crop up.

    Any clues?

  24. stevemagruder Says:

    Upon further investigation, I determined that this problem is caused by the All in One SEO Pack plugin.

    It provides for an override to the title attribute, which is fine, I guess, but if it’s left blank, it doesn’t default to what was already set for the title (whether by WordPress or by PLP), and instead sets no title attribute. Ack! I’m going to post my fix to the All in One SEO Pack forum on WordPress.org.

  25. stevemagruder Says:

    I posted the fix here: http://semperfiwebdesign.com/forum/all-in-one-seo-pack-troubleshooting/title-attribute-setting-issue-and-a-fix-believe-it-or-not/

  26. jmov Says:

    Hi!

    I’ve been trying to use this plugin and managed to get it working only partially.

    The “Custom Link Class”, “Add span tags inside list items”, works for example.

    But these doesn’t work: “Unlink current page”, “Alternative link text”, “Alternative Title attribute”.

    I’ve tried using this:
    wp_list_pages_plus(’title_li=&exclude=4,5,6′);
    in my template file, but it gives me an error saying the function is not defined. (I do have wp_head(); in my header’s section).

    But it still works partially when I’m using the original:
    wp_list_pages(’title_li=&exclude=4,5,6′);

    Any tips on this?

    I also have a suggestion:

    An option to add custom class for the element within the as well. In my current design this is required because navigation is highly styled based on CSS-backgrounds, and each element has different background picture for passive/active(same as hover) states. Though I think I can achieve what I need without classing the , only if the unlink current page would work.

    Thanks!

  27. marshall Says:

    This plugin is excellent. In understand that it’s meant for pages and not posts, but would you consider making it work with posts in a future release?

    The Recent Articles widget (the default one) lists article titles, and they are either too wide to look good there or they must be kept s short as to look silly at the top of the article.

    I’ve found a couple other plug-ins that allow alternate page names in page lists, but yours is the best. One of the others USED to do posts but they removed it because they felt it was unnecessary. Now they say it will be in a future release. But your plugin is better, and I’d rather use this one if it eventually supports posts. :)

  28. trishacupra Says:

    I’ve just found a problem where it was hard to make the alternative link text ’stick’ when there is a question mark in the page title (but not in the link text). I got it to stick after deleting the question mark in the title and changing the link text, then updating the post, and then going back to add in the question mark again. Weird.

  29. scottbothel Says:

    I love this plugin and it’s on my list of essentials for every site I build now. One conflict that I have had to watch for is relating to the canonical url behavior now built in to Wordpress. I love that is works when people don’t have the exact right url, but the PLP plugin can be messed up in the process.
    I was finding pages with similar names (read: slugs) were taking on the settings of another page. To avoid this, I simply make sure that the slugs and sometimes title and sufficiently unique and the problem is averted.
    Other plugins I’ve used have suggested disabling canonical url’s, but in this case I’d rather keep the benefits of both.
    I hope this helps someone!

  30. ikelove Says:

    Hey,
    I want to first off thank you for making this plugin and thus making life easier for people like me who want unclickable parent items in dropdown menus.
    My question is thus: Before when the parent items were clickable, they would be highlighted when I was on their children’s page, but now that I have been able to make the parent items in menus unclickable, the parent tab no longer is highlighted when I’m on the pages of one of their children. What tweaking do I have to do to make sure that even though a parent tab is unclickable, I can still have it highlighted when I’m on the page of one it’s children?

    Your help would greatly be appreciated.

  31. Sachin Says:

    Hi Tim,
    thanks for the great plugin. I’ve been testing it on a new website that I’m building and I’m facing an issue. In 2 cases, the Alternative Link Text is replaced by the original page title when this one is selected. Has anybody come across this weird behaviour?
    Cheers
    Sachin

  32. dementiascotland Says:

    ~Thanks, this plugin is superb for Wordpress SU websites; just a shame it doesn’t work fully for MU.

    With MU the PLP options displayed on page edit ‘Alternative Link Text’ and ‘Include in Page Lists’ work fine. The issue is getting other PLP options to display.

    I guess if I can find where the options are stored, I can manually enter the options, perhaps copying PLP options from a wordpress SU install. Please, where are the options stored?

    cheers
    ian

  33. gloriam3 Says:

    I love the concept of the plugin and need just this type of thing for a site I’m building on wordpress 2.9.2 – is anyone having issues with this compatibility? When I activate the plugin, I get a series of errors on the site – example:
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/home/mai103/www/htdocs/newsite/wp-content/plugins/page-lists-plus/page-lists-plus.php on line 328

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/home/mai103/www/htdocs/newsite/wp-content/plugins/page-lists-plus/page-lists-plus.php on line 355

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/home/mai103/www/htdocs/newsite/wp-content/plugins/page-lists-plus/page-lists-plus.php on line 366
    etc.

    I tried turning off other plugins, but still get the same result. Anyone had this happen and found a solution?

  34. Miszy Says:

    Yes, I had to cope with that issue. The problem is when you do any mysql query before the wp_list_pages function.
    I do not know why page-lists-plus plugin does not use wpdb class but standard mysql_query etc functioncs to call database queries.

    To fix that problem you have to exchange each mysql_query (or at least these outlined in you comment) with $wpdb->get_results(”query…”, ARRAY_A);
    and mysql_fetch_assoc with
    if(is_array($variable))
    foreach($variable as $row)

Leave a Reply

You must be logged in to post a comment.