Our news

View Our Latest News From Within Our Industry

Start Your Project
Quick Enquiry

    How To Add A Custom Slug To Your WordPress Posts Without Adding It To Custom Post Types

    What we find in websites today is that the blogs are always claiming the secondary position as the websites are coming on top. The landing pages are typically placed at the root and beneath them is placed their children. You can check that from the URLs:

    • Page with Product Detail: http://www.wordpress-website.com/our-products/some-product/
    • Page for Product Landing: http://www.wordpress-website.com/our-products/

    Now, the clients has the expectation that the WordPress blog will use somewhat same format like:

    • Page For Posting Blogs: http://www.wordpress-website.com/blog/some-exciting-blog-post/
    • Page For Landing Blogs: http://www.wordpress-website.com/blog/

    This can be done very easily by just following the permalinks settings of WordPress. You have to change the custom permalink structure into :

    /blog/%postname%/

    One thing more you have to make sure that your /blog/ is not prepended by any custom post types to their URLs. You have to visit where the custom posts are registered and remove it by setting with_front to false. Like-

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

    When you are done making the changes, go to Settings > Permalinks and click on save.

    back to news

    13 Responses to - How To Add A Custom Slug To Your WordPress Posts Without Adding It To Custom Post Types

    Leave a Reply

    You must be logged in to post a comment.