How to I completely separate categories

Hello,

I'm using wordpress posts to display two kinds of posts:

1) the posts I want to display on the blog
2) a series of tutorials (all tutorials have the "Tutorials" category assigned to them)

Is there a way to keep them completely separate?
What's the best way to keep them separate?
For example, in the post when I'm listing the next/prev item, a post from the tutorial is displayed from the blog (and the other way around).

Thanks.

  • Jack Kitterhing

    Hi there Andrea, @nagar

    I hope you are well today and thank you for your question.

    As @espsjurs suggested, I'd also use a custom post type for this along with custom fields, you could use our CustomPress plugin here https://premium.wpmudev.org/project/custompress/ which is fully compatible with all latest releases of WordPress, Multisite and BuddyPress. :slight_smile:

    This would be the best way to go to keep it separate.

    Thank you for being a WPMU DEV member!

    Kind Regards
    Jack.

  • nagar

    Thanks so much for the info Jack. It looks like CustomPress is really great for that. I've already installed and created a custom post type.
    I have a few questions:

    1) if I want to migrate some posts (that are standard blog posts) in the new post type, how can I do it? (I have about 20 of them). Can I just make changes in the database, editing the custom post type?

    2) I had assigned categories to those posts (will they show in the /blog/category page: shall I define a custom taxonomy for the custom post type - categories are different from the posts)?

    3) How can I have all the posts displayed as /tutorials/post-name?

    4) How can I retrieve the list of custom-type posts? (I had some custom code that retrieved the posts belonging to a category)

    Thanks so much.

  • Jack Kitterhing

    Hi there @nagar

    I hope you are well today and sorry for the extreme delay with my reply, I missed your previous response.

    1) if I want to migrate some posts (that are standard blog posts) in the new post type, how can I do it? (I have about 20 of them). Can I just make changes in the database, editing the custom post type?

    I wouldn't recommend migrating a post to a different post type, as the permalink structure will be incorrect for the post type, it could be changed in the database, but you may still have some problems with doing it that way, I'd personally recommend just copying the content and creating the new posts manually.

    2) I had assigned categories to those posts (will they show in the /blog/category page: shall I define a custom taxonomy for the custom post type - categories are different from the posts)?

    They wouldn't show in the /blog as they wouldn't be a blog post type they'd be their own custom post types, for example in marketpress, products is a custom post type.
    This means your archive for that post type would be yourdomain.com/post-type if that makes sense?

    3) How can I have all the posts displayed as /tutorials/post-name?

    You can create your post type name as "tutorials" (without the quotes :slight_smile:

    4) How can I retrieve the list of custom-type posts? (I had some custom code that retrieved the posts belonging to a category)

    Is this what you are looking for with regards to that?

    Custom Fields Block 	
    
    Used to embed the output of a set of custom fields for the current post. Must be used inside the loop.
    Basic shortcode
    [custom_fields_block]
    Returns a full set of input fields based on the post type of the post id provided.
    
    or with field list
    [custom_fields_block] _ct_selectbox_4cf582bd61fa4, _ct_text_4cfeb3eac6f1f,... [/custom_fields_block]
    Returns a set of input fields as supplied by the field id list in the shortcode. Any ids not associate with the post type will be ignored.
    
    or with field list filtered by category
    [custom_fields_block] [ct_filter terms="cat1, cat2,.."] _ct_selectbox_4cf582bd61fa4, _ct_text_4cfeb3eac6f1f,... [/ct_filter] [/custom_fields_block]
    Multiple filters may be used in one input block.
    
    Attributes for the [custom_fields_block]
    wrap = Wrap the fields in either a "table", a "ul" or a "div" structure.
    The default wrap attributes may be overriden using the following individual attributes:
    open = HTML to begin the block with
    close = HTML to end the block with
    open_line = HTML to begin a line with
    close_line = HTML to end a line with
    open_title = HTML to begin the title with
    close_title = HTML to end the title with
    open_value = HTML to begin the value with
    close_value = HTML to end the value with

    Thank you!

    Sorry again about the delay.

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.