Support » Plugin: Restaurant Menu by MotoPress » Menu permalink redirecting

  • Resolved lucein

    (@lucein)


    so I have a page called menu with a permalink (/menu/). But after installing your plugin, this permalink redirects to a default blog post page showing the menu items that I have added to your plugin.

    How do I get your plugin to either set the permalink /menu/ to my page or stop your plugin from redirecting to this blog post page?

    please advise.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author MotoPress

    (@motopress)

    Hi @lucein,
    Thank you for your question. Please try to change the url of your page from /menu/ to something different like /menus/ or /menu-page/

    When I delete the plugin – I can no longer access /menu/ it all redirects to the home page.

    Of course I can change the url, but that is just ridiculousness.

    Very annoyed over here, how can I fix this?

    Plugin Author MotoPress

    (@motopress)

    Hi @anna-webdesign,
    You can try to chnage the slug of Restaurant menu post type from /menu/ to something different using code below:

    add_filter( 'register_post_type_args', 'custom_restaurant_menu_slug', 10, 2 );
    function custom_restaurant_menu_slug( $args, $post_type ) {
    
        if ( 'mp_menu_item' === $post_type ) {
            $args['rewrite']['slug'] = 'menu-item';
        }
    
        return $args;
    }

    You can place it to functions.php file of your Child Theme. Do not forget to save settings at Settings>Permalinks to refresh the changes.

    But doesn’t that just sound ridiculous? I decided to try your plugin – wasn’t happy – tried to delete it but it is just not possible?

    Your plugin was all over my database after deleting your plugin – and even after deleting everything in the database I can not use the /menu/ slug?

    And now I can not ever use /menu/ anymore unless I rewrite it in the functions.php?

    I don’t even know what to say 🙁 Very unhappy with this.

    Plugin Author MotoPress

    (@motopress)

    Hi @anna-webdesign,
    I meant if you want to go on using our plugin you could try the code I sent. If you uninstalled it and menu link is not available still please try to go to Settings>Permalinks and save changes to refresh it. If it is not helpful please email us.

    Aah misunderstanding! Thanks this works! Have a great tuesday!

    Plugin Author MotoPress

    (@motopress)

    Hi @anna-webdesign,
    We are happy it works. Have a nice day

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Menu permalink redirecting’ is closed to new replies.