Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1003919
Rename Portfolios Slug
Closed

Comments

  •  2
    wlm2015 started the conversation

    How do I rename the slug so that the URL doesn't have the word "portfolios" in. For example: 

    http://codex-themes.com/thegem/portfolios/web-project-15/

    http://codex-themes.com/thegem/custom-term/web-project-15/


    This will be necessary for SEO benefits and also for humans, because in the context of my site, "portfolios" does not make sense.

  •  7,092
    Oliver replied

    HI!

    You can change slug in the

    wp-content/plugins/thegem-elements/inc/post-types/portfolios.php 

    line 31

    'rewrite' => array('slug' => 'portfolios', 'with_front' => false),
    

    After changing slug:

    1. Deactivate and activate  Gem elemets plugin.

    2. Activate any another theme then activate gem theme.

    Pls. note after update of the gem elements plugin your revisions will be removed, you need to do it again.

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    Martin replied

    Is there no better solution possible? To make it adjustable with a variable within the Admin Panel?

    This would be a big improvement! :-)

  •  7,092
    Oliver replied

    Ok, another way. 

    In the functions php of the child theme add next code:

    function thegem_portfolio_post_type_change() {
        $args = get_post_type_object("thegem_pf_item");
        $args->rewrite["slug"] = "portfoliossss";
        register_post_type($args->name, $args);
    }
    add_action('init', 'thegem_portfolio_post_type_change', 10); 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    Martin replied

    working perfect, thanks a lot!

  •  7,092
    Oliver replied

    You are welcome!

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    SeanToro replied

    Thank you!!! So much easier! Was just looking for this solution.

  •  2
    gruppo_sgr replied

    Hi, I've applied this trick and it works but now I can't open portfolio items, error 404. Why?

    EDIT: Ok, I've deactivated TheGem Element plugin, re-activated, changed theme and selected TheGem again. Now it works. The only problem is that when I open a portfolio item the photo and galleries inside are not visible during the loading of the page. I don't know why.

    Thanks,
    Gruppo SGR

  •  7,092
    Oliver replied

    HI!

    pls. add new private ticket with wp-admin access.

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    gruppo_sgr replied

    Hi,
    I've another question: is it possible to make a link structure like this?

    http://codex-themes.com/thegem/custom-term/custom-category/web-project-15/

    Many thanks,
    Gruppo SGR

  •  7,092
    Oliver replied

    HI!

    Sorry, without code changes in the gem elements plugin, no. 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    gruppo_sgr replied

    Ok, thanks.

    Gruppo SGR