WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Sidebar Menu
[resolved] Use WP menu entries rather than page titles for long URLs (8 posts)

  1. M One
    Member
    Posted 5 months ago #

    Search optimised page titles / URLs can be relatively long. The WordPress menu allows you to enter a short name leaving the search optimised URL / title intact but presenting a user friendly name in the menu.

    ASM takes its entries from page titles by default if these are keyword rich they are not necessarily suitable for sidebar menus. I would love to be able to use the WordPress menu entry in page menus instead of the page title. Have looked at developer doc link but unsure what available filters do.

    Is there one that does this? If not any ideas / guidance / examples of how it could be done?

    Many Thanks.

    Note - similar question posted by user recently but asked to repost as marked resolved.

    https://wordpress.org/plugins/advanced-sidebar-menu/

  2. Mat Lipe
    Member
    Plugin Author

    Posted 5 months ago #

    Hi M One,

    There is a plugin out there which lets you edit this type of thing.
    http://wordpress.org/plugins/page-lists-plus/

    It looks like it has not been updated in a while and I have not used it in years, but it's worth a shot.

    As far as combining custom menus with the plugin, we currently have it on the board for a possible add-on, but have not decided to move forward with it yet due to uncertainty if it defeats the purpose of ASM. ASM was built as an easy way to auto generate menus on the fly. Combining custom menus adds and extra step. They only reason it's being considered is there have been over 10 requests for it.

    HTH

  3. Mat Lipe
    Member
    Plugin Author

    Posted 5 months ago #

    Otherwise you could look into using the filter before you widget output and remove it after you widget output.

    apply_filters( 'the_title', $page->post_title, $page->ID )

    Something like

    add_filter('the_title', 'c_title');
    function c_title($title){
       if( $title == 'old title' ){
          return 'New Title';
       }
    }

    I jotted this down real quick from memory so you may have to adjust it slightly, but it will get you close.

    HTH

  4. M One
    Member
    Posted 5 months ago #

    Thanks Mat,

    Have tried page-lists-plus and it works (woo canvas). Not exactly as I want it to - adds custom link box to each page where you can define the menu item text rather than globally redefining them according to the main menu settings but that's OK.

    Unfortunately it is abandonware so I really can't rely on it as a critical element of my sitebuild. Wish someone would pick up the baton.

    Also afraid your filter beyond my abilities - what, where? - so going to have to hope that you guys see the light and value of providing custom definitions for page menus in your excellent plugin sometime soon. Just a custom field on pages would be fine ;)

  5. M One
    Member
    Posted 5 months ago #

    After much trawling I have have found the right question to ask:

    How do I get wp_list_pages to display a navigation label defined in a custom field instead of the_title (as long as that custom field is defined - failing that, wp_list_pages should default to the_title)?

    Unfortunately I can't find the answer ...

  6. M One
    Member
    Posted 5 months ago #

    Fortunately I have found an actively supported plugin with a good user base (50k) that works:

    http://wordpress.org/plugins/page-menu-editor/

    Would still rather see the option in ASM though ;)

  7. Mat Lipe
    Member
    Plugin Author

    Posted 5 months ago #

    Hello M One,

    The ability to use a custom menu in this widget has been officially taken off the list of future possibilities.

    However the ability to customize the links text has now been added to the pro version which gives you pretty much the same thing without an extra step of configuring/updating a custom menu.

    http://matlipe.com/product/advanced-sidebar-menu-pro/

    HTH

  8. M One
    Member
    Posted 5 months ago #

    Thanks Mat - helps me and sure a lot of people will find it useful.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.