Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the breadcrumb-navxt domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/xhtmrzif/public_html/www.xhtmlhub.com/wp-includes/functions.php on line 6114
How To Add A Custom Slug To Your Wordpress Posts Without Adding It To Custom Post Types - PSD TO HTML

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.