Support » Plugins » [Plugin: The Events Calendar] Showing the Events on the home page

  • Resolved Jonas Grumby


    Just wondering if anyone has come up with a solution as to how you can show the TEC events on your home page and still display the calendar correctly.

    I also find that Posted in <?php the_category(', ') ?> shows links to the regular post categories but not the events categories and would appreciate it if anyone has code that will show a link to either the post category or the event category as needed.

    Seems like links to events don’t show up under Recent Posts either. Any thoughts on that?

    I know that all of the above is because the new version of the plugin uses custom post types instead of post categories.

    Other issues I am having are:

    If I set a Featured Image it shows up on the single post page full-size above the post and again in the post with the size & placement that I have specified.

    The Google link works fine but the Google map is way too zoomed out.

    I am using plugin version 2.0.1, a custom theme, and the most recent version of WordPress.


Viewing 15 replies - 1 through 15 (of 33 total)
  • If I set a Featured Image it shows up on the single post page full-size above the post and again in the post with the size & placement that I have specified.

    This can be fixed by removing these lines:

    	if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) {?>
    		<?php the_post_thumbnail(); ?>
    	<?php } ?>

    from /wp-content/plugins/the-events-calendar/views/single.php

    I guess there is also a way to make copies of the plugin’s templates so that you can edit the copies and not lose your changes during an automatic upgrade. At least it was that way with older versions of the plugin.

    This seems to be working for me in terms of showing the events on the home page and not messing up the calendar display.

    add_filter('pre_get_posts', 'query_post_type');
    function query_post_type($query) {
      if(is_category() || is_tag() || is_home() && empty( $query->query_vars['suppress_filters'] ) ) {
        $post_type = get_query_var('post_type');
    	    $post_type = $post_type;
    	    $post_type = array('post','tribe_events','attachment');
    	return $query;

    Jonas, you rock!!! I’ve updated the post on the blog.

    No problemmo. Glad I could help. Thanks for the awesome plugin!

    In retrospect you would probably be better off using is_archive() than is_category() because while is_category() will make your old category link work, it will only show the old events that were entered before upgrading to TEC version 2.0.

    I added this code to my functions.php file and noticed that when you go to any category page the top navigation has been removed.

    Shane – will this option be included in upcoming releases of the events-manager plugin? And is this option included in the Events Pro version?

    Hi @andywaterson,

    It’s possible that this is being caused by your theme. When you have a chance, please switch to the default theme temporarily and LMK if the problem goes away.

    I’ve tried this on other themes than the one I’m using and it happens on all of them. Also tried it on the Twenty Eleven 1.2 theme and the Twenty Ten 1.2 both of these themes do not show the WordPress navigation when clicking onto a category page.

    Have used Jonas solution above – thank you, appears to kind of work on my theme but the formatting between real posts and calendar posts has lots it’s grey seperation bar.

    Here’s the site address – any help appreciated!

    Anyway, great plugin – hope it can be expanded to include this post/calendar function natively.

    @andywaterson – I’m using wp_list_pages to generate a pages menu and it works fine with that hack. I will take a look at Twenty Ten & Twenty Eleven to see what they are using.

    @supersonic – I only see one gray horizontal line at the top of all of the posts. It appears to be coming from, {
        border-top: 4px solid #EEEEEE;

    OTTOMH I would say that you either need to apply that CSS to the TEC post ID or class attributes in the CSS, or add the line to the php template inside the loop (at the very beginning or end). If you do the latter you should remove the border info from the CSS or you may end up with a double border on non-event posts.

    Yet another solution might be to make your template non-exclusive.

    Right now the code reads:

    <div id="post-2636" class="post-2636 post type-post status-publish format-standard hentry category-merchistoun-news odd">

    With post type-post in there, the CSS rule is only being applied to posts that have the default post type. It may be pretty simple to remove that.

    Seems like this problem may be related to custom post types in general and not just the plugin…

    Having played w/ custom post types a bit, it’s interesting to note that it’s pretty easy to set a custom post type to support tags & categories (as well as taxonomies).

    Thank you for trying to help me Jonas and taking the time to post – I am afraid that the ongoing tweaking required is going to outweigh the benefits of using this plugin.

    Enjoyed using this plugin in it’s previous form – afraid 2.x is a bit of step in the wrong direction.

    Thankfully my events finish at the end of the year.

    Going to give a spin in my dev. environment as it seems to offer much more (at least on their glossy website!).

    Thanks again.



    Good luck, supersonic. I’ve been looking at them too. Their subforum here is pretty active. There’s also a fork of their older version called Events Made Easy.

    Note, however, that they’re moving to the same custom-posts-type format as TEC 2.x!

    And this is why I’m still at unsupported TEC 1.x.

    I think it’s safe to say that custom post types are here and we are all having to figure out how to deal with them. They are great when you have a specific reason for keeping certain posts out of the main posts loop. I still don’t understand what was gained by making this plugin use a custom post type. Certainly they lost the “plug-n-play” aspect that this plugin used to have, which I think is important to any public theme or plugin. The plugin does work well, especially if you can figure out all the ins and outs of how to make it display when, where, and how you want it to. Luckily custom post types are a WordPress core feature, so there is plenty of documentation and forum chat that you can read about them.

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘[Plugin: The Events Calendar] Showing the Events on the home page’ is closed to new replies.