rontarson
Forum Replies Created
-
Also it seems when creating a reccurring event using [event_form], the event image does not get saved
The shortcode version works perfectly. It’s the php call using EM_Events::output that is NOT working. In the PHP call, pagination shows however the links to the next pages does not function. It simply reloads the first page and does not advance.
No sample link yet. Building locally.
Forum: Themes and Templates
In reply to: Displaying Custom Taxonomy Category DataYeah I tried
<?php $catId = get_term_by( 'slug', 'event-cat-slug', 'event-categories' ); $catId = $catId->term_id; print_r($catId) ?>
before and wasn’t able to get it to pull the taxonomy ID. You had the same thought process I did. I can’t seem to figure this out.
I could use some advice on this if anyone has any to offer… Don’t feel like manually changing categories on each event if I don’t have to.
Question:
I have seven categories in EM 4 and when running some test upgrades to EM 5 the categories are being randomly assigned to events different than they were in EM 4. For example, an event in EM 4 that was “Entertainment” only now has “Outdoor” and “Featured” also assigned to it. Any thoughts as to why this is happening?Maybe an htaccess issue? Is your htaccess file in place and correct in your wordpress directory?
The following permalink rewrite code should be included in your .htaccess file (since WordPress 3.0):
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
For a full textual representation of the day of the week you would use l (lowercase ‘L’)
IE:
#l #j #M = Friday 16 DecYou talking about when printing the actual date I assume? Such as Events – #j #M #y ?
Take a look at the PHP Manual for Date – https://php.net/manual/en/function.date.php
This will show how to format the date for anyway you wish.
So to continue on the below should be modified to
$EM_Event->term_id;
but what aboutget_categories()
andget_ids()
? Are these being updated as well?if (class_exists('EM_Events')) { $currentid = $EM_Event->id; //get and store the current event id $cats = $EM_Event->get_categories(); //get the categories for the current event $cat_ids = $cats->get_ids(); //get the ids for the categories of the current event $cat_ids_strg = implode(',', $cat_ids); //make a comma separated string of category ids
If you place the code below directly above
if( $events_count > 0 ){
this should place pagination above your list. This will likely show it twice though so you will need to modify the existing code to remove the below pagination, if desired. Not fully tested that but could do the trick. Hope that helps.if( !empty($args['limit']) && $events_count > $args['limit'] ){ //Show the pagination links (unless there's less than $limit events) $search_args = EM_Events::get_post_search() + array('page'=>'%PAGE%','_wpnonce'=>$_REQUEST['_wpnonce']); $page_link_template = preg_replace('/(&|\?)page=\d+/i','',$_SERVER['REQUEST_URI']); $page_link_template = em_add_get_params($page_link_template, $search_args); echo apply_filters('em_events_output_pagination', em_paginate( $page_link_template, $events_count, $args['limit'], $args['page']), $page_link_template, $events_count, $args['limit'], $args['page']); }
Yes. I see that same error of switching back to All Countries, although in my application the country would never be anything than the US.
I also have the error that if I plug in a town to search, the search does not return any values, even though I know it should. Just region search works, but when throwing in a town it stops working. Thoughts?
No just using it on category-single.php And if i take out everything else on the template page and just use
<?php echo EM_Events::output( array( 'limit'=>20, 'scope'=>'future', 'category'=>1, 'pagination'=>1, )); ?>
The pagination still doesn’t work. It DOES work everywhere else in EM world on my site, just not on category-single. Confusing.
Disregard, I found the error. I had modified the below.
if(!empty($_REQUEST['scope']) && !is_array($_REQUEST['scope'])){ $_REQUEST['scope'] = explode(',',$_REQUEST['scope']); }
Isn’t that happening in the change functions above?
$('.em-events-search-form select[name=country]').change( function(){
and
$('.em-events-search-form select[name=region]').change( function(){
The submit function
$('.em-events-search-form').submit(function(){
looks to be submitting via Ajax into#em-wrapper
and.em-events-list
Or am I completely miss interpreting this?
@agelonwl Got this organized in functions file. Appreciate it
Disregard. I took another direction with this and got it working