L
L
ligisayan2016-04-11 10:57:11
Calendar
ligisayan, 2016-04-11 10:57:11

How to combine posts and events into one category on a wordpress site?

Hello! The WordPress site has the Events Calendar plugin installed . I want to make it so that the events of one calendar heading are displayed on a par with posts with the same heading, but because they belong to different taxonomies, the first thing we do is we add categories to the events:

add_action( 'init', 'tribe_add_post_categories');
function tribe_add_post_categories() {
  register_taxonomy_for_object_type( 'category', 'tribe_events' );
}

now it remains to make them appear in the same cycle as the posts - how can this be done?
For example, posts are displayed using the following construction:
<?php while (have_posts()) : the_post(); ?>
  <?php endwhile; ?>   <!-- end post -->

how about events? or at least what their 'post_type' is - how do you know?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2016-04-11
@mr_ko

It won't help. They are separate because they have different taxonomy vocabularies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question