WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Couple of Queries... (8 posts)

  1. one3rdnerd
    Member
    Posted 1 year ago #

    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.

    Thanks

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    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.

  3. one3rdnerd
    Member
    Posted 1 year ago #

    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... http://sunderlandparents.co.uk/events/ and http://sunderlandparents.co.uk/event/young-achievers-youth-arts-exhibition/ 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.

  4. jonahcoyote
    Member
    Posted 1 year ago #

    Hey one3rdnerd,

    Does this help: https://gist.github.com/2415009

    - Jonah

  5. one3rdnerd
    Member
    Posted 1 year ago #

    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>';
    endwhile;
    wp_reset_query();
    endif;
    echo '</ul><a class="archive-more" href="http://sunderlandparents.co.uk/events">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.

  6. jonahcoyote
    Member
    Posted 1 year ago #

    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: http://tri.be/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events

    I hope that helps!

    - Jonah

  7. one3rdnerd
    Member
    Posted 1 year ago #

    Brilliant that worked for me, thank you :)

  8. jonahcoyote
    Member
    Posted 1 year ago #

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

    Cheers,
    - Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.