Ready to get started?Download WordPress


wp_rewrite and custom post types (2 posts)

  1. dependent
    Posted 2 years ago #


    I am trying now for a couple days to solve the following Problem:

    I habe a custom post type called gallery. I need the URL
    to be parsed like

    I think I have tried about every code snipped that I could find to solve this problem but nothing seems to work.
    If I flush all rewrites, none of my links work anymore (404)

    Is is even possible?

    I'll be happy about any answer.
    best regards

  2. Maor Chasen
    Posted 2 years ago #

    If you use the default permalinks (query string), you'll be able to feature URLs in this format


    If that's still not good and you actually need the /gallery/ path, you'll probably be able to do this by adding a new, custom rewrite rule using add_rewrite_rule().

Topic Closed

This topic has been closed to new replies.

About this Topic