WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Rewrite - Get Post in Category (3 posts)

  1. samanime
    Member
    Posted 3 years ago #

    Hello,

    I'm trying to create a rewrite rule which will get a post matching a specific slug that is within a specific custom taxonomy. Any ideas?

    The reason I have to do this is because I have slugs which are the same (in different parts), but the parents are stripped out of the URL, so I have to use the custom taxonomy to differentiate them.

    Thanks.

  2. samanime
    Member
    Posted 3 years ago #

    So, I realized that I could change my rules around and hard-code in the parent.

    However, post_parent=123 doesn't seem to be working. WP_Query just ignores it completely and I'm not sure why.

    Any help would be greatly appreciated.

  3. samanime
    Member
    Posted 3 years ago #

    So, instead of using:
    post_type=myposttype&name=mypage

    I ended up doing
    myposttype=parent/mypage

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.