Permalink custom post types

I have my blog residing in a subfolder www.site.com/blog. The custom post types like slide and portfolio do not reside in that subfolder, e.g. www.site.com/portfolio-item. I could easily achieve this by editing meta-portfolio.php, meta-offer.php and so on.
I needed to change the the 'with-front' argument from true to false and tweaked some other setting.
With your latest update, the custom post type 'portfolio' changed. I have been searching now very long where I could change back that 'with-front'-argument for the porfolio-type. Because, by default, the portfolio is residing on www.site.com/blog/portfolio-type and not www.site.com/portfolio-type.
Where can I change this right now? Could you help me out?
Thank you!
Koen.

Comments

  • Hi,

    slugs for portfolio can be easily changed now in Theme options > Getting started > Portfolio section. We added one new option so now you can change portfolio-types as well.

    Thanks!
  • Hi, Yes I know that. But my default slug is www.site.com/blog, because I have moved my blog to that subdirectory. However custom post types (like portfolio) are moving also, unless I can set the 'with-front'-argument of the rewrite to false. I could easily do that in meta-portfolio.php. I can still do that in meta-testimonial.php for instance, but not for portfolio anymore. So where I change this rewrite rule for the portfolio-type with your latest update?
    So I don't want www.site.com/blog/portfolio-type, I want www.site.com/portfolio-type (so without the blog).
    Thanks,
    Koen.
  • I talked with coder and he said that you can do this in the same place as the last time.
    $args = array(
        'labels'                 => $labels,
        'menu_icon'                => 'dashicons-portfolio',
        'public'                 => true,
        'publicly_queryable'     => true,
        'show_ui'                 => true,
        'query_var'             => true,
        'capability_type'         => 'post',
        'hierarchical'             => false,
        'menu_position'         => null,
        'rewrite'                 => array(
            'slug'             => $slug,
            'with_front'    => false,
        ),
        'supports'                 => array( 'author', 'comments', 'editor', 'excerpt', 'page-attributes', 'thumbnail', 'title' ),
    );
  • OMG, so easy. Thank you for your wonderful support! You guys are the best.
  • Yes, it is so easy :) You're welcome!
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.