Widget categories & venues dropdown not using permalinks

WordPress Event Management, Calendars & Registration Forums General Question Widget categories & venues dropdown not using permalinks

This topic contains 8 replies, has 2 voices, and was last updated by  Stephen Harris 9 years ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #21696

    Hi Stephen,
    Not sure when this started, but the widget dropdown now links to the ‘ugly’ permalinks, not the pretty ones. Not showing the widgets as a dropdown seems to work fine. Thanks,

    Oliver

    Matthew Tarzwell
    #21707

    Hi Oliver,

    This has always been this way, and is consistent with WordPress’ default category widget.

    It’s possible to improve on this, however.

    Stephen Harris
    #21708

    Ah. Hmm – this completely breaks on my site for some reason, even if I save the permalinks. Am I doing something wrong?

    Matthew Tarzwell
    #21713

    It 404s? Can you provide a link? (Does WordPress’ category dropdown not work either? It uses similar code).

    Stephen Harris
    #21714

    Yes, it 404s on the dropdown, but not if I change it to a list.

    Click on ‘Sidebar’.

    You can see it here: http://inside.tru.ca/events

    • This reply was modified 9 years ago by  Matthew Tarzwell.
    Matthew Tarzwell
    #21716

    I should mention – the default WordPress ones work fine. You can see them at inside.tru.ca -> also click on ‘Sidebar’.

    Matthew Tarzwell
    #21723

    Thanks Oliver,

    I see what’s happening here: it’s using the ID rather than slug, which is causing the problem. Normally the user is redirected to the pretty URL automatically, but here the user is being directed to ?event-category=<id> instead of ?event-category=<slug> and so it’s 404ing.

    The widget hasn’t changed in 4 months, so I wonder if WordPress core has changed the output of wp_dropdown_categories().

    I’ll release a fix for this shortly, but you can immediately fix it with the following:

    add_filter( 'eventorganiser_widget_event_categories_dropdown_args', function( $args ){
        $args['value_field'] = 'slug';
        return $args;
     } );
    
    Stephen Harris
    #21724

    Thanks Stephen. No rush on my end – I’ll just wait until the fix is in. 🙂

    Sorry – I could have been more clear with the description as to what was happening; it’s been a busy day. Busy week.

    Matthew Tarzwell
    #21746

    3.0.4 has just been released, so this should now be fixed.

    Stephen Harris
Viewing 9 posts - 1 through 9 (of 9 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.