• is there a way to do that? Right now, the title attribute in the ‘a’ tag just defaults to the page title – where would I go to change that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can do this from within administration.

    – Login
    – choose “Presentation”
    – choose “widgets”

    Drag your “Pages” widget to the sidebar area. Once there, a little icon in the “Pages” bar will appear. Click on it. A small configuration box appears. Place your cursor in the “Title” field and press the spacebar (to make the “Pages” title disappear in your sidebar) or type whatever you want to appear as your “Pages” title.

    HTH-

    Unfortunately that is not what the original poster is looking for. Abelcreative is looking to change the title=”” attribute inside the HTML that is generated by the wp_list_pages() function, which is something I’ve been looking to do as well.

    What you offered only changes the heading content that gets generated by the widget.

    Say for example that you have a link to a contact page and the WordPress Page title is “Contact”. The Page title will get echoed on the menu as the content for the anchor element, as well as the value of the anchor’s title=”” attribute. If you want to change “Contact” to “Send Me an Email” you’re going to quickly find that you can’t do it because the function simply will not let you.

    Unfortunately the only “solution” I’ve found was to rip the function out of the theme and just hand-code the menu list directly, though this does mean that you will have to manually add to your header.php (or sidebar.php depending on where your Page menu goes in your particular theme) each time you want to edit the menu.

    I don’t have the function in front of me but, obviously, the title attribute is dynamic (as is the Page Title) and they just use the same value that’s stored in the database in both locations.

    It sounds like you would have to modify the related database table to accept an “attribute slug”. But, then you get into having to be able to modify administration to be able to submit the slug, etc., etc.

    Or, use one of the existing columns (and it’s related text field in admin) might be used for a quick hack.

    Hope this helps.
    (Sorry for any confusion I caused with my first reply!)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘edit ‘title=’ attribute in wp_list_pages link’ is closed to new replies.