BertvanDorp
Forum Replies Created
-
The [display-posts id=”xxx”] didn’t work in my custom post type (Event from Events Manager), that’s why I requested it. Didn’t look into the cause though, as I switched to another solution for this.
Hmm looks like there’s quite a lot of CSS to be learned on my end, I was happy to have even found a solution. Hope this will help others as well, thanks for suggesting a more thorough solution!
Did that, thanks Marcus!
I got it to work, just replied on the first thread!
Whoa, I got the thing to work! Thanks to the other thread and some trial-and-error on formatting. Funny thing is that this way actually uses the name of the category to generate the category id and filter on this, so this can be used as a general implementation! I added handling for permalinks as well. Here’s the code:
/* Get the category ID */ $uri=$_SERVER['REQUEST_URI']; $args=explode('/',$uri); /* handling different permalinks */ if ($args[1]=='index.php') { $start_index_URI=2; }else{ $start_index_URI=1; } /* retrieve category ID from WP Events Manager DB */ if($args[$start_index_URI]=='events' && $args[$start_index_URI + 1]=='categories') { $cat_name=$args[$start_index_URI + 2]; $cat_obj=get_term_by('name', $cat_name , 'event-categories'); $cat_id=$cat_obj->term_id; }
and the loop on (former) line 13:
$EM_Events = EM_Events::get(apply_filters('em_calendar_template_args',array( 'limit'=>get_option('dbem_ical_limit'), 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope'), 'category'=>$cat_id )) );
So, there’s now three ways to get an export:
1. per event
2. per category: [site]/events/categories/[category name]/events.ics
3. whole calendar: [site]/events/events.icsMarcus, I guess this is something you can just implement and document? It also works with different permalinks, as stated before.
Forum: Plugins
In reply to: [WP FullCalendar] Set Sunday to first day of the week@Kristinxxxxx have you tried setting different start days on WP itself? Didn’t work for me by the way ..
When I request Events Manager it displays the agenda according to the first day I set in the WP Settings, so it works fine on that end. Must be something in the Main.js, and since it’s working for other users, maybe it has something to do with other plugins or languages?
Followed Smarru’s work closer, by using the code from the site and inserting the categories like: [site]/index.php/events/categories/Kerkdiensten/events.ics. Still no results.
Also tried adjusting the search array, using
$EM_Events = EM_Events::get(apply_filters('em_calendar_template_args',array( 'limit'=>get_option('dbem_ical_limit'), 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope'), 'category' => get_option('category') )) );
and [site]/index.php/events/events.ics?category=[id]. Didn’t work as well.My permalinks are different, and so I tried shifting the &args[1] around, didn’t work. Does anyone know how I can get PHP to display what value of cat_id it found?
Followed up in the other thread: click.
I’ve got the feeling I’m the only guy who doesn’t get it to work.. I feel Im close though; probably some syntax thing? I inserted smarru’s code into my template/ical.php as follows:
$uri=$_SERVER['REQUEST_URI']; $args=explode('/',$uri); /* Get the category ID */ if($args[1]=='events' && $args[2]=='Kerkdiensten') { $cat_name=$args[3]; $cat_obj=get_term_by('name', $cat_name , 'event-categories'); $cat_id=$cat_obj->term_id; }
And I altered the array by using:
$EM_Events = EM_Events::get(apply_filters('em_calendar_template_args',array( 'limit'=>get_option('dbem_ical_limit'), 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope'), 'category'=>'cat_id' )) );
at (previous) line 13, as given by Marcus.By the way: ‘Kerkdiensten’ is the name of the category. I’m now trying to retrieve the .ICS using the link: [site]/index.php/events/Kerkdiensten/events.ics. It does not matter if I use [site]/index.php/events/Kerkdiensten//events.ics
However, this still returns all events, not just from this category. Am I overlooking something here?
@agelonwl thanks! will look into it. Seems I need to add arguments to the call, and filter based on the category in the argument.
@marcus: I guess this will provide helpful for a lot of users, as the site can actually offer a limited subscription. I don’t have the time nor the resources to tackle this for the coming months. However, I’m willing to look into the filtering, see if there’s a way. Do you have any pointers on using the fact that the category also generates the ical needed?
Forum: Plugins
In reply to: [WP FullCalendar] Removing event start times in WP FullCalendar@dwbjd have you checked Events -> Settings -> WP Full Calendar -> Event Title Format? In here , you can use Events Manager Placeholders, like ‘#_24HSTARTTIME #_EVENTNAME’.
Forum: Plugins
In reply to: [WP FullCalendar] Displaying Events on Full CalendarFirst, configure Full Calendar by going into Settings -> WP FullCalendar. Secondly, use [fullcalendar] shortcode on a WP page to call the Full Calendar. This is all in the docs, really.
Forum: Plugins
In reply to: [WP FullCalendar] Background color of calendar itemThe layout is in the .CSS files, which get called to generate the layout for the jQuery/HTML/JavaScript calendar. You could alter the .CSS by generating CSS classes per category, and alter the JS files to handle categories differently. However, that’s quite a stretch: you need to be able to program in JS and handle CSS. I haven’t really looked into it; maybe there’s some other codepath you could use?
Does anyone know any alternatives?
Forum: Plugins
In reply to: [WP FullCalendar] Showing event start times in WP FullCalendar month view.In Events -> Settings -> Full Calendar Options, there’s a settings called ‘Event Title Format’. In here, you can use placeholders from Events Manager. For example, my site has ‘#_24HSTARTTIME #_EVENTNAME’ filled in, which works just fine with Full Calendar. Does this work for you?
Forum: Plugins
In reply to: [WP FullCalendar] FullCalendar Hide content of previous / next monthsJust to clarify: are you using Event Manager for the events, or just using Full Calendar on it’s own?