Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm creating a website for a soccer club. It has news, reports and media custom post types. There you can connect the post to the Team taxonomy. But I also need to have a page for that team where I can add info, team photo etc.

Can I connect a page to a certain taxonomy? For example I got a page called "Team 1" and connect that to the taxonomy term "Team 1"?

If not what is the best option?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can register taxonomies for objects (such as posts & pages) like so:

add_action( 'init', 'wpse_71914_assign_page_taxonomy' );

function wpse_71914_assign_page_taxonomy() {
    register_taxonomy_for_object_type( 'taxonomy_name', 'page' );
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.