Change "menu" slug in url

This support request was posted in BBQ by vanwoods

Request ID #3318 Resolved
  • Hi Juan,

    Thanks for the translations part of the theme they work fine now!

    An other question:

    Is there a possibility to change the slug “menu” in the url of the menu pages? I would like to use it for something else, so the word menu is not preferable at this point.

    I hope there is a way to change it.

    Thanks in advance.

    Regards,
    Patrick

    Juanfra Aldasoro

    Hello Patrick,

    Thanks for writing.

    The “menu” part of the URL is set when defining the “menu” Custom Post Type.

    I’m pretty sure there might be a plugin in the WordPress.org plugin repository in order to get that changed.

    If not, it’s pretty simple. You can check how the menu custom post type is defined in /bbq/includes/custom-post-types/menu.php

    You’ll need to change the “rewrite” parameter (You can learn more here: http://codex.wordpress.org/Function_Reference/register_post_type)

    Then, use something like

    'rewrite' => array( 'slug' => 'whatever-you-want-instead-of-menu' ),
    

    Finally, reset your permalinks structure in “Settings > Permalinks”.

    Best,
    Juan.

    Hi Juanfra,

    Thnx for the reply!

    I changed the rewrite array in /bbq/includes/custom-post-types/menu.php into
    ‘rewrite’ => array( ‘slug’ => ‘concepts’ ),

    ` $args = array(
    ‘labels’ => $labels,
    ‘public’ => true,
    ‘publicly_queryable’ => true,
    ‘show_ui’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘concepts’ ),
    ‘capability_type’ => ‘post’,
    ‘hierarchical’ => false,
    ‘menu_icon’ => get_template_directory_uri() . ‘/engine/admin/images/btn-menu.png’,
    ‘menu_position’ => null,
    ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘page-attributes’, ‘excerpt’ )
    );`

    and activated the rewrite plugin where i changed “menu” into “concepts”.

    I t works but I don’t know if this is the right way?

    Regards,

    Patrick

    Juanfra Aldasoro

    Hi Patrick,

    Yes, that’s the way to set a custom slug for custom post types. Please have in mind that you changed this when updating the theme.

    Best,
    Juan.

    Ok thanks! I’ll keep that in mind.

    Regards,
    Patrick

    Juanfra Aldasoro

    No problem 🙂

    Have a nice day,
    Juan.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic is marked as resolved

Only the topic author can re-open this thread.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server