Support » Plugin: The Events Calendar » Couple of Queries…

  • Resolved one3rdnerd


    I have been looking through the docs and forums to find out a few things…

    I know where the templates are to edit then, I am using the Thesis theme which uses an unusual templating system when compared to most. While everything is working quite nicely I have two things I need to do..

    1) Find the if statement so I can set conditional css classes and decide which thesis template to load. Example issues here are that Thesis has a sidebar template and a no sidebar template, all events pages are using the sidebar template but I need a conditional statement related to if post type = events?? so I can remove the sidebar on all of these pages. I also want to use this to remove a few other wordpress hooks which are not necessary.

    The second thing I want to do is make a function in my theme using the wordpress loop to call the last 5 event titles within a larger function which also calls in posts. So any advice on that would also be welcome as I cannot work this info out from the docs.


Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rob La Gatta


    Hey one3rdnerd. Thanks for the note here, and for checking out the plugin. I should say right off the bat that we’ve received a few reports this past week of conflicts between the plugin and Thesis 2.0, and while we’re putting together an integration tutorial ourselves, there are likely to be problems.

    That said: these issues, if I’m understanding them correctly, shouldn’t be impacted by that. I can’t speak with 100% confidence on that end but I’ve asked Jonah from our dev team – far more knowledgeable on such issues than I – to take a look and see if he can point you in the right direction. No guarantees, as this may fall more into customization than we can provide here on dot-org, but he may have some ideas to point you in the right direction.

    Stay tuned, and thanks for your patience so far.

    Hi Rob,

    Due to Thesis 2 being too new and a pain with plugins in many cases the site in question is using the 1.x framework of thesis, to be specific the latest version which is 1.8.5

    The option within your plugin to choose the templates available doesn’t seem to actually activate. I tried selecting no_sidebars template but it doesn’t actually apply.

    All I really need is the php conditionals so I can use the code I normally would when doing something like

    if is page then use this template

    but I of course need to say if is events single page or events list page then add this body class, and also so I can call the thesis no sidebars template to use the full width.

    Currently it looks like this… and because it loads the events template inside the default thesis page template which has a sidebar, and you cannot apply the no_sidebars template via your settings inside the dashboard or by any other wp-admin means, so I have the code which I know does this via my functions file for any other page or post aka is_single or is_page etc but not how to call these pages your plugin creates?

    Thanks for the feedback, this is a site for a client, the plugin is really good.

    Hey one3rdnerd,

    Does this help:

    – Jonah

    Hi Jonah,

    That looks right up my street! I will give those a try in a moment, thank you.

    On another note I also want to call single events through with a custom query, at the moment to pull posts through into a static page I use the below

    $custom_loop = new WP_Query('posts_per_page=8&offset=1');
    echo '<div class="my-arch-right"><ul class="archive-list">';
    if ( $custom_loop->have_posts() ) : while ( $custom_loop->have_posts() ) : $custom_loop->the_post();
    echo '<li><a class="archive-link" href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
    echo '</ul><a class="archive-more" href="">See More Events</a></div><div style="clear:both;margin-bottom:15px;"></div>';

    But I want to also call the latest 5 events as well into the function beneath this one. Which are would I need to be looking at adjusting?

    Thanks again, keep up the good work guys.

    Hey one3rdnerd,

    On the queries you can basically use any of the standard WP_Query parameters to affect your query. You can also look at some examples here with some additional parameters being passed:

    I hope that helps!

    – Jonah

    Brilliant that worked for me, thank you 🙂

    You’re welcome one3rdnerd, please let us know if there’s anything else you need. Going to mark this as resolved.

    – Jonah

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Couple of Queries…’ is closed to new replies.