• steffenms

    (@steffenms)


    Hi,

    I have the theme “Hueman” and the plugin “The Events Calendar” (TEC) installed. Now I want the theme to list the created events just like they were posts. TEC has a setting to make that happen (“integrate events in blog loop”) and it works with other themes. Unfortunately it does not work with Hueman.

    Any suggestions how I could solve this Issue?

Viewing 2 replies - 1 through 2 (of 2 total)
  • bdbrown

    (@bdbrown)

    Hi steffenms. You might find more information on the plugin support forum, or the vendor support forum.

    Thread Starter steffenms

    (@steffenms)

    Hi,

    Thanks for your answer. This is a theme related issue, as TEC works fine with other themes, I hoped to find someone with a solution over here.

    However, with the help of the other forums I came up with a solution for this:
    I only tried it briefly, but it seems to work:

    Put this code into the functions.php of the Hueman theme. Please remark the custom post type of TEC named tribe_events which is added to the main blog by this.

    function my_post_queries( $query ) {
      // not an admin page and is the main query
      if (!is_admin() && $query->is_main_query()){
        // query the home page
        if(is_home()){
          $query->set('post_type', array('post','tribe_events'));
        }
      }
    }
    add_action( 'pre_get_posts', 'my_post_queries' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The events calendar plugin – events as posts on main site’ is closed to new replies.