WordPress.org

Forums

Way to combine custom post type with categories? (6 posts)

  1. DougJoseph
    Member
    Posted 4 years ago #

    Basically:
    We need category functionality on the front side, but with custom post type functionality on the back (admin) side.

    Details:
    We need both the normal functionality of categories and the admin menu enhancements that custom post types offer (such as can be obtained by using the Custom Post Types UI plugin).

    It would be awesome if either the Category Write Panel plugin's effects did not have such a low limit on how many top-level categories can be used (any more than 17 starts making normal admin menu items disappear, eating away needed functionality), or if the Custom Post Types UI plugin's options in the Admin menu could trigger (or correspond to) categories in addition to (or instead of) custom post types.

  2. hughhempel
    Member
    Posted 4 years ago #

    Bump...

    We have the exact same requirement... We would ideally like to use a custom post template on the back end and have those posts share categories with and "comingle" with the "standard" post types in the loop...

    Any suggestions?

    Thanks in advance!

  3. hughhempel
    Member
    Posted 4 years ago #

    In our case the formatting of the posts on the front end would be slightly different (more structured)...

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    If you want both types of posts on the front, you just need to query both using query_posts
    post, and your custom type

  5. hughhempel
    Member
    Posted 4 years ago #

    Thanks Rev.! Really appreciate the reply...

    I think I will also need to change the post template to include the custom fields etc. from the custom posts... The trick will be to figure out how to do the template so that it accomodates both post types and provides the content in the structure desired...

    Thanks again!

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    sure, from the codex: query_posts( array( 'post_type' => array('post', 'movie') ) );

    would display the normal post type, and the movie post type on your page....but don't forget about pagination

    http://www.rvoodoo.com/projects/wordpress/wordpress-tip-fixing-pagination-on-custom-queries-with-query_posts/

    is a quick blurb about ensuring pagination with custom queries

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.