Forums

How to associate a Custom Post Type to an existing category ? (4 posts)

  1. cooperanet
    Member
    Posted 1 year ago #

    Hi,

    I created a custom post type called, for example, 'job offers'.

    Is there a way to assign directly the posts from this custom post type 'job offers' to an existing category of my website like Recruitment' for example?

    Any help or suggestions would be greatly appreciated!

    Thnaks a lot!

  2. cooperanet
    Member
    Posted 1 year ago #

    Anyone?

  3. madpress
    Member
    Posted 1 year ago #

    sure, just add this line:

    'taxonomies' => array( 'post_tag', 'category '),

  4. cooperanet
    Member
    Posted 1 year ago #

    Hi Madpress,

    Thanks for your reply.

    I know this piece of code, but it will only add the possibilty to check a category among all the defined categories, will it?
    I don't think that it will assign the custom post type to a specific category.
    I will give a try this afternoon and let you know.

Topic Closed

This topic has been closed to new replies.

About this Topic