Forum Replies Created
-
AuthorPosts
-
Jonah
ParticipantHey Ken, did you try tribe_is_venue()? https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_is_venue
Jonah
ParticipantHey Ross, these are not bugs, these are just differences in how themes interact with our plugin. We are making changes to the templating system so that event pages will be more like actual WordPress pages, but this is not fixing anything that was broken. It’s simply improving upon what we currently have.
Also, the above code may not be exactly what you need for your setup – you need to have an understanding of both Thesis, PHP and our plugin to understand what’s going on. For instance, the conditional code that adds the body class sets the default body class to ‘one_sidebar’ if none of the other conditions are met. So this is probably why you are seeing it applied on every page. If you don’t want that, simply remove that part of the code.
Jonah
ParticipantHi Alvar, look at the third example, it uses the tax_query argument in the query. You can find more out about tax_query here: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
March 5, 2012 at 1:14 pm in reply to: Can I just remove the month drop down from The Events Calendar Pro? #16233Jonah
ParticipantHey Corey, sure, just hide it with CSS:
#tribe-events-events-year,
#tribe-events-events-month {
position: absolute;
top: -9999px;
left: -9999px;
}
Jonah
ParticipantHi JT,
Make a duplicate copy of: /wp-content/plugins/the-events-calendar/views/table.php and place in an ‘events’ folder in your theme. Then on line 166, right after the call to the post thumbnail add this:
If you need to access any other venue info you’ve got a slew of template tags to work with: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-venue-functions/#functiontribe_get_venue
I hope that helps!
Jonah
ParticipantSorry, code got botched above, try this: http://pastebin.com/gbE2LjiM
Jonah
ParticipantAhhh I see, sorry I misunderstood earlier…
So all you need to do is; after you’ve removed all sidebars, then conditionally set specific pages to use only one sidebar like so:
// Restore sidebar 1 to layout
function restore_sidebar(){if('tribe_events' == get_post_type()) {
if ( is_single() && !tribe_is_showing_all() ) { // single event ?>
<?php }
} else {
}
}
add_action('thesis_hook_content_box_bottom','restore_sidebar',1);
// Add a class for styling
function one_sidebar($classes) {if('tribe_events' == get_post_type()) {
if ( is_single() && !tribe_is_showing_all() ) { // single event
$classes[] = 'one_sidebar';
} elseif ( tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || (is_single() && tribe_is_showing_all()) ) { // list view
$classes[] = 'one_sidebar';
} else { // grid view
$classes[] = 'one_sidebar';
}
} else {
$classes[] = 'one_sidebar';
}
return $classes;}
add_filter('thesis_body_classes', 'one_sidebar');
Then just add your css like they indicated:
.custom .no_sidebars #content { width: 51.4em; }
.custom.one_sidebar #container { width: 100em; }
.custom.one_sidebar #sidebars { width: 21.7em; }Basically, you’re using the same conditional code but with the additional function to conditionally add sidebars back to specific pages…
Hopefully that points you in the right direction!
Jonah
ParticipantHi Richard, I’ll do my best to point you in the right direction but you’ll need to work with some of theme specific issues yourself.
On #1: you’ll want to use conditional code to modify how the title is being displayed on various pages. Find in your theme where the_title() is being called and use the following code to override:
if(tribe_is_month()) {
echo 'Calendar Grid';
} else if(tribe_is_event() && !tribe_is_day() && !is_single()) {
echo 'Event List';
} else if(tribe_is_event() && !tribe_is_day() && is_single()) {
echo 'Single Event';
} else if(tribe_is_day()) {
echo 'Single Day';
} else {
the_title();
}
On #2: there’s probably a few ways to do this with CSS and you’ll need to figure out the perfect way but one way that should work is to modify the /wp-content/plugins/the-events-calendar/resources/events.css file (place a copy in an ‘events’ folder in your theme). On line 23 for the #tribe-events-calendar-header div, add a width of 700px. That should work.
I hope this helps!
Jonah
ParticipantHey Stephen, the next/prev links for the mini view is no easy feat indeed. However, we do have this on our todo list for an upcoming version but you’ll have to wait until then.
Cheers,
JonahJonah
Participant… the code I posted on page 2.
Jonah
ParticipantCarlos, the code I posted shows you how to conditionally set the number of sidebars on single events, the events list, and the grid view. Does this not work for you?
Jonah
ParticipantHi Herman, it looks like the page content is there now? Is this only because you don’t have an events widget in the sidebar?
Jonah
ParticipantHi Aaron, unfortunately this is not possible without hacking the core which we do not support. It may be a feature we will add at a later date but for now you will have to work around it. I would suggest you add this as a feature request to the related thread: https://theeventscalendar.com/support/forums/topic/events-calendar-pro-feature-requests/
Jonah
ParticipantHey Julien, if either of the plugins don’t work for you; then the code Joey provided should.
Jonah
ParticipantHi Jacob,
This appears to either be a bug or a theme conflict, probably a little of both. I need to check with the other developers to see what we can do about this. Stay tuned.
– Jonah
-
AuthorPosts
