Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Rewriting archive url of custom post type

  • Resolved user10522three

    (@zorrohere)


    At the moment I am using custom post type with archives. The url to monthly archives is example.com/2017/8/?post-type=type-slug

    Is it possible to change the url structure to example.com/type-slug/2017/8/

    I tried few configurations but nothing helped and couldn’t find anything related to customizing urls for CPT archives.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Beda

    (@bedas)

    This is dictated be WordPress itself.

    You cannot rename the archive with Types. This is also not possible with the WordPress GUI.

    Thanks!

    Thread Starter user10522three

    (@zorrohere)

    Thanks for writing back. Can you please take a look at this thread? And please let me know if I can write any hooks to achieve the behavior I would like?

    Also just to clarify in case there is misunderstanding, I just want to use type as slug instead of url query.

    Plugin Support Beda

    (@bedas)

    Well, we have that setting as well.
    It’s in Toolset > Post Types > your_post_type > Edit > Options > Rewrite Rules.

    If that helps you, this is where Types lets you edit it.

    But that will not help you to move the archives Slug at the end of the URL.
    This is as far I know simply how WordPress works in Archives.
    It will create those URL’s for you.

    Thread Starter user10522three

    (@zorrohere)

    Thanks for explanation. So the thread I am referring to is incorrect? Sorry for so many questions.

    Plugin Support Beda

    (@bedas)

    I am sorry, I passed you a wrong detail.

    Please find the setting you need in Toolset > Post Types > your_post_type > Edit > Options > has_archive > “Allow to have custom archive slug for CPT.”

    That will rewrite the URL of the archive.

    But what is not possible ( and that is why I got confused at the begin ) is the sequence of your URL.
    example.com/type-slug/2017/8/
    this is not possible.

    If you use Types to modify the native default of WordPress it will be:
    http://stable.mamp/your-slug/

    Thread Starter user10522three

    (@zorrohere)

    Ohk that makes it clear. Thanks so much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Rewriting archive url of custom post type’ is closed to new replies.