WordPress.org

Ready to get started?Download WordPress

Forums

Problems with Custom Post Types being added to categories and archives (6 posts)

  1. adam533
    Member
    Posted 4 years ago #

    Hello

    I am working on a complex site design for a client and I am using WordPress 3 to take advantage of the custom post types. I have a couple of questions that I have been searching for answers for but have had no luck. Thought it may be easier to post each of them to one post here and hope someone will have an aswer :) Thanks in advance!

    Some background:
    - I am using the new plugin Simple Custom Post Type Archives but have not had luck getting it to work correctly.
    - I have two custom post types setup currently Articles and Drills
    - I created the custom post types using the plugin Custom Post Type UI
    - I set both post types to also use Categories and Tags from within the CPTUI Plugin

    Questions:
    1) I am looking to have the new post types also show up in my archives but have not had any luck getting this to work.

    2) I would like to be able to go to .com/articles or .com/drills and have the posts list show

    3) Since I am assigning categories and tags to these post types, when I click on a tag and get all posts that had it assigned none of the custom post types appear on that list.

  2. emandel
    Member
    Posted 3 years ago #

    Adam,
    I hope you found an answer to your question because I've been wasting the last two days working on this myself.
    I am using the "More Types" plugin, I created two custom post types; Book Post and Music Post, each post that I create with the Book Post type has a URL that looks like this: http://www.yidster.com/?book-post= instead of the regular http://www.yidster.com/archive/.

    I'm lost, if you've figured out how to fix it, would you please reply below?

    Thanks

    Eli

  3. Peter vanDoorn
    Member
    Posted 3 years ago #

    Hi guys.

    Not sure if this is a complete answer for you both, but should certainly answer adam's no. 2 and emandel's question:

    I have custom post types and use the Permalink structure of: /%category%/%postname%/ which gives me the custom post type in the URL as you both require.

    Hope that helps

    peter

  4. emandel
    Member
    Posted 3 years ago #

    Peter,
    That is the permalink structure that I have in the regular settings (Settings:Permalinks) I just tried it in the custom post type settings but when I went to look at the posts it didn't redirect to the correct category or post, this is what it looks like: http://www.yidster.com/archives//%category/%postname%//a-tale-of-two-wagons
    I also tried it without the extra backslashes and without "%category" but it still only said %postname etc. it didn't actually redirect to the post.

    Eli

  5. Peter vanDoorn
    Member
    Posted 3 years ago #

    The Permalink code should be /%category%/ - you appear to have missed the 2nd %.

    When you registered your Custom Post Types, did you remember to set rewrite to true? WordPress won't use nice URLs for your CPTs unless you do!

    Hope that helps

    peter

  6. emandel
    Member
    Posted 3 years ago #

    I added that % and this is what I get now: http://www.yidster.com/archives/%category%/a-tale-of-two-wagons

    I don't remember that option (rewrite), and I also don't see it anywhere now.
    I even deactivated More Types, deleted it and reinstalled it but I still didn't get the option to rewrite :(

    Thanks for your help.

    Eli

Topic Closed

This topic has been closed to new replies.

About this Topic