The Events Calendar
[resolved] Events not showing with posts on initial page load (5 posts)

  1. adamvlaw
    Posted 2 years ago #

    I have enabled the events to show with the page's regular posts which are included on the one-page homepage of my site. Strangely, the events will not show up when the initial load of the page happens. I have to go to the events page (in main nav) and then go back to the homepage for them to show up. Can anyone help me fix this?

    site is: http://oneteamonefight.org/


  2. Barry Hughes
    Plugin Author

    Posted 2 years ago #

    Hi adamvlaw,

    Does this happen even with all other plugins disabled and using only a default, unmodified theme such as Twenty Twelve?


  3. adamvlaw
    Posted 2 years ago #

    I haven't tried that. I basically installed the event calendar plugin after the site was built and rolling for the client. Thanks for your response!

  4. adamvlaw
    Posted 2 years ago #

    I emailed the theme developer and they sent me this:

    Hey Adam,

    Yes, if you're using blog posts on the homepage then the blog posts are loaded from a custom query from the blog block in the page builder. By far the easiest way for you to get this working is to modify the query in the blog block;


    If you forward that info to the plugin developer, he will be able to tell you what to add to include the events.

    In that file the query looks like this;

    $paged = (get_query_var('page')) ? get_query_var('page') : 1;
    $blog_query = new WP_Query('post_type=post&paged=' . $paged);
    if( $blog_query->have_posts() ) : while( $blog_query->have_posts() ) : $blog_query->the_post();
    Forward this info and you should have an answer from the other developer :)

    I'm closing this ticket now as the main question is moving towards 3rd party plugins, which is not covered in these support tickets.

    Cheers :)

    So... can you help me?

  5. Barry Hughes
    Plugin Author

    Posted 2 years ago #

    Sorry Adam but we can't help with customizations like that here, especially as by the sounds of things your theme is doing something rather atypical in not using the main blog query to fetch blog posts.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic