Forum Replies Created
-
AuthorPosts
-
ToddParticipant
Does that mean there’s no filter-hook to simply change the ‘order’ parameter in the DEFAULT query? Like …
add_filter(‘tec_default_query_filter’,’fix_past_list_order’);
function fix_past_list_order(){
if tribe_is_past() {
$the_default_query[‘order’] = ‘DESC’;
}
}Does a hook like “tec_default_query_filter” exist? Or do we really need to use tribe_get_events() to build a custom version of the Past-List functionality — just to change the order?
ToddParticipantBefore getting Pro, my client was setting up a recurring-event (like every Tuesday in November) by setting the Start date as the first occurence, and the End date as the last occurence, so the event (quite incorrectly) appeared on the calendar EVERY DAY between the Start and End dates. With the recurring feature, now it can correctly show only on the four Tuesdays. I am HOPING my client does not care about fixing the incorrect / every-day dispay of the PAST events, and just enjoy the correct display for FUTURE events.
But if they insist on fixing the past events too.. is there any function or hook to adjust/correct the date of the “next instance” of a recurring event — basically, is there a way to fix this bug?
November 20, 2014 at 7:52 am in reply to: Show TEC as child of another page in the url/permalink #892139ToddParticipantI found a hook in the plugin — tribe_events_register_event_type_args — and used it to modify the rewrite slug from “events” to “club/events”.
add_filter(‘tribe_events_register_event_type_args’,’tz_tec_urls’);
function tz_tec_urls($foo) {
$foo[‘has_archive’] = true;
$foo[‘rewrite’][‘slug’] = ‘club/events’;
return $foo;
}This worked for the Events List, and a normal-single Event. These URLs show the right page – ‘site.com/club/events’ and ‘site.com/club/events/some-event-title/’.
But it does NOT work for these, the page shows a 404 for these URLs:
– Month View — ‘site.com/club/events/month/’
– Recurring Events — ‘site.com/club/events/some-recurring-event/2014-11-22/’Why would the custom rewrite-slug — using the built-in hook — NOT work for these URLs / pages?
ToddParticipantthanks Brian!
ToddParticipantHi Josh. Yes, i kept working on the problem after i posted here.
As you saw, the event with the problem has “old” appended to the title, which i did because i subsequently created a NEW event as a test — and this new event works properly.
My old event was originally a normal/single event, created in TEC v2.x, before i upgraded to v3.8.1 and purchased the Pro add-on yesterday. Once i got the Pro, I CHANGED that event to be a recurring event, and this resulted in the date/link bug.
The NEW event (created as a test, and which works properly) originated as a Recurring Event, and was created in TEC v3.8.1.
Testing further, i created another new event (in v3.8.1) as a single/normal event, and then changed it to be recurring. This also worked properly!
So it seems the bug occurs for events that were created in v2.x. I wonder if you can replicate this.
ToddParticipantis there really no way to edit my own comment/post on this thread?
ToddParticipantHi Barry, thanks for the reply. I do have pretty-permalinks enabled. I’m using the ‘month and name’ option (http://protocolwine.dev/2014/02/sample-post/).
My event-list is — site.com/events/
My single-event is — site.com/event/my-event/
My category-page is — site.com/events/my-cat/
But my PAST event-list is — site.com/events/my-cat/past/?action=tribe_list&tribe_paged=1That’s where i’m seeing url-vars that have “tribe” in the names and values.
ToddParticipant@Barry — The .tribe-events-venue-map has a 33%-width container (.tribe-events-meta-group), so the map can’t be wider than 33% of the page width, which is really much too small to actually see the map.
@Kyle — Thank you so much! That will be great 🙂 Much better than what i had done — which was to disable TEC’s google-maps entirely, and do my own iframe —
$myVenue['address'] = tribe_get_address();
$myVenue['city'] = tribe_get_city();
$myVenue['state'] = tribe_get_state();
$myVenue['zip'] = tribe_get_zip();
$myVenue['map_address'] = $myVenue['address'] .", ". $myVenue['city'] .", ". $myVenue['state'] .", ". $myVenue['zip'];
$myVenue['map_address'] = urlencode(str_replace(" ", "+", $myVenue['map_address']));if( tribe_get_address() || tribe_get_city()) { ?>
<iframe width="600" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=&z=14&output=embed&iwloc=near">
}
ToddParticipantI see that the map is at 100%, but (when not using the Skeleton-styles css) the map’s container — .tribe-events-meta-group — is only 33% and floated left. And this container has no other css class to hook onto, so any css put on .tribe-events-meta-group hits all meta groups. By contrast, the Venue’s container div gets a .vcard class in addition to .tribe-events-meta-group, which allows it to be targeted specifically.
Is there any way to target the Map’s container (without resorting to jquery), using a filter hook somehow? Or could the next release add a .map class to the container?
July 24, 2013 at 1:25 pm in reply to: Inaccurate documentation in source code for tribe_get_organizer_link() #56945ToddParticipantAnd.. while we’re talking about the Organizer-Website Link …
I wrote a little filter for that, changing the linked text to “See Organizer Website”, rather than displaying the full URL. In my case that url is often long enough to break my layout, since these meta-groups get only 1/3 of the page width.
So again my 2-cents — i’d like to see an OPTION in the wp-admin (either globally, or per event, or per organizer?) to enter a custom string for the linked-text, rather than the full URL.
July 24, 2013 at 1:23 pm in reply to: Inaccurate documentation in source code for tribe_get_organizer_link() #56944ToddParticipantThanks for following up on this Jonah. My 2-cents is that it works very nicely already, and the functionality should not change.
Currently, in the Organizer meta-group, the Organizer’s NAME links to his permalink, and the Organizer’s WEBSITE (if provided) links away to his website.
If the organizer-name also linked to his website, we’d have two links away to his website, and no links to his permalink page on my site (which nicely lists all his events).
So my personal suggestion would be to simply update the documentation, and keep the current functionality.
ToddParticipantYep, exactly – that’s what i’m doing, with css rules like:
body.single-tribe_organizer li.nav1-events a {}
It works great, when the menu LI doesn’t get classes like “current_page_item”, etc.July 19, 2013 at 11:22 am in reply to: Inaccurate documentation in source code for tribe_get_organizer_link() #56128ToddParticipanti am seeing tribe_get_organizer_link() returns the Organizers name linked to that organizer’s permalink on MY website – the page that uses the Single-Organizer.php template. I am not seeing tribe_get_organizer_link() return a link to the organizer’s website, as entered in his cpt post.
ToddParticipantHmmmmm, sorry for the confusion here. Basically everything is ok. I actually now realize that i should not expect my the Single-Venue page to get those “current-menu-item” and “current_page_item” classes added to my “events” main-menu tab, as none of my other TEC/ECP views have it. So it’s fine – but i don’t know how it’s happening on this template.
My main-menu Events tab is actually a PAGE-item, associated to a Page i have called “Events”. I know this conflicts with the “events” CPT from TEC, so the “events/” url shows TEC, instead of my events “page” content, which is fine. (I have that page just to allow a child-page to have the url “events/suggest-an-event/”.
I then use custom CSS classes to my menu-items (in Appearance > Menu > Advanced properties), like “nav1-events” for my Events tab. And then use TEC’s body-classes to highlight my Events tab as needed, like “body.single-tribe_organizer li.nav1-events a {}”.
And that’s what i did to properly highlight my Single-Organizer pages, as well as the main TEC calendar-grid and lists views. But for some reason, my Single-Venue pages are getting those “current-menu-item” and “current_page_item” on the Events tab.
I see I could add “Events” to my menu as a Custom Link (rather than as a Page), but i think I’d still need to use this custom CSS to enable the tab-highlighting for all the different TEC/ECP views. Unless i missed something. By the way, i had done all this work a while back on ECP v1.3.2, and just now upgraded to 3.0.3, so perhaps this could be done more easily now.
ToddParticipant(I guess we can’t edit replies in this forum?)
Correction in my 2nd post in this thread: The file that contains the filter is /public/template-tags/organizer.php, not /public/advanced-functions/organizer.php. -
AuthorPosts