Forums

Clean Archives Reloaded
[resolved] Clean Archives Reloaded - Include custom post types? (6 posts)

  1. mike62
    Member
    Posted 6 months ago #

    I would love to be able to include custom post types in my archive. I see on line 218 it is selecting just the "post" post_type, would it be possible to include an array in there? My php is limited, so I don't know what the syntax for that would be.

    I'd also love to be able to exclude a category from the Archives page...

    Any help would be greatly appreciated. Thanks!!

    http://wordpress.org/extend/plugins/clean-archives-reloaded/

  2. Alex Mills (Viper007Bond)
    Moderator
    Posted 5 months ago #

    This plugin really needs a rewrite, but meanwhile:

    ...  AND post_type IN ( 'post', 'a_custom_post_type', 'another_post_type' ) AND ...

    And for reference, that's MySQL syntax rather than PHP.

  3. mike62
    Member
    Posted 5 months ago #

    Cool, thanks! That works beautifully. Is there also a way to exclude a category (or two)?

  4. Alex Mills (Viper007Bond)
    Moderator
    Posted 5 months ago #

    Is there also a way to exclude a category (or two)?

    Yes, but that gets a lot more complicated as you need to JOIN in another database table.

  5. mike62
    Member
    Posted 5 months ago #

    Cool thanks for letting me know. I can work around that easy enough, but being able to include the custom post types is super helpful. Makes for a much more complete archive. Thanks for your time, and for the plugin. :)

  6. Alex Mills (Viper007Bond)
    Moderator
    Posted 5 months ago #

    No problem. :)

Reply

You must log in to post.

About this Plugin

About this Topic