Forums

Custom Post Type + Taxonomy Permalinks (2 posts)

  1. elmediano
    Member
    Posted 6 months ago #

    Hi all!

    I know there are loads of posts regarding this matter but I'm afraid I haven't been able to find a solution.

    What I'm trying to do seems very simple but I just can't get it to work.

    I have been commissioned to create an A to Z list of business, places, etc. so I have created a Custom Post Type called:

    A to Z (a-to-z)

    and registered a hierarchical taxonomy for it called:

    Letters (letters)

    and added all the alphabet letters to it so my client can add a listing and "categorise" it under the relevant letter.

    The problem is I can't get the permalinks to work. What I'd like to do is the following:

    http://www.domain.com/a-to-z/%letter%/%postname%/
    or for example
    http://www.domain.com/a-to-z/a/adidas-shop

    But i can only get:
    http://www.domain.com/a-to-z/%postname%/

    Here's my code on Pastebin

    Any help would be great!
    Cheers

  2. elmediano
    Member
    Posted 6 months ago #

    I tried adding the post type a-to-z and just use the WP built in category system.

    I then added a post through the A to Z section and categorised it under the letter A and I still get a permalink like this:

    www.domain.com/a-to-z/postname
    instead of
    www.domain.com/a-to-z/a/postname

    However if I add a post via the normal way (Posts) and categorise it under A I get what I'm looking for:

    www.domain.com/a-to-z/a/postname

    Please help! :)

Reply

You must log in to post.

About this Topic