Linkero
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [Events Maker by dFactory] Delete event ticket link in a past eventI wrote the code in a different way with the function em_display_event_tickets_url() inside de condition, but I haven’t new results :
<?php // get event date $post_id = get_the_ID(); $end_date = em_get_the_end( $post_id ); // check if event has passed if ( strtotime( $end_date ) < strtotime('now') ) { if(ICL_LANGUAGE_CODE=='es') { ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="#" target="_blank"><span class="text"><?php _e('SOLICITAR MATERIALES', 'events-maker'); ?></span></a></p> <?php }elseif(ICL_LANGUAGE_CODE=='ca'){ ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="#" target="_blank"><span class="text"><?php _e('SOL·LICITAR MATERIALS', 'events-maker'); ?></span></a></p> <?php } }else{ if (!function_exists('em_display_event_tickets_url')){ function em_display_event_tickets_url($post_id = 0){ $post_id = (int)(empty($post_id) ? get_the_ID() : $post_id); // get ticket url $tickets_url = get_post_meta($post_id, '_event_tickets_url', true); ?> <?php if(ICL_LANGUAGE_CODE=='es') { ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="<?php echo esc_url($tickets_url); ?>" target="_blank"><span class="text"><?php _e('RESERVAR PLAZA', 'events-maker'); ?></span></a></p> <?php }elseif(ICL_LANGUAGE_CODE=='ca'){ ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="<?php echo esc_url($tickets_url); ?>" target="_blank"><span class="text"><?php _e('RESERVAR PLA?A', 'events-maker'); ?></span></a></p> <?php } ?> <?php } } // Display button get ticket em_display_event_tickets_url(); }?>
Forum: Plugins
In reply to: [Events Maker by dFactory] Delete event ticket link in a past eventstrtotime = 1442511610
current_time = no resultI’ve tryied this:
strtotime (“now”) = a number like strtotime($end_date)
But the conditional didn’t work with “now” neither.
Forum: Plugins
In reply to: [Events Maker by dFactory] Delete event ticket link in a past eventI’m checking if the event has past with your piece of code, but I think it doesn’t making effect when compare both dates.
I don’t understand what I’m doing wrong.
<?php if (!function_exists('em_display_event_tickets_url')){ function em_display_event_tickets_url($post_id = 0){ // get event date //$post_id = (int)(empty($post_id) ? get_the_ID() : $post_id); $post_id = get_the_ID(); $end_date = em_get_the_end( $post_id ); // get ticket url $tickets_url = get_post_meta($post_id, '_event_tickets_url', true); // check if event has passed if ( strtotime( $end_date ) < current_time( 'timestamp' )) { if(ICL_LANGUAGE_CODE=='es') { ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="#" target="_blank"><span class="text"><?php _e('SOLICITAR MATERIALES', 'events-maker'); ?></span></a></p> <?php }elseif(ICL_LANGUAGE_CODE=='ca'){ ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="#" target="_blank"><span class="text"><?php _e('SOL·LICITAR MATERIALS', 'events-maker'); ?></span></a></p> <?php } }else{ ?> <?php if(ICL_LANGUAGE_CODE=='es') { ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="<?php echo esc_url($tickets_url); ?>" target="_blank"><span class="text"><?php _e('RESERVAR PLAZA', 'events-maker'); ?></span></a></p> <?php }elseif(ICL_LANGUAGE_CODE=='ca'){ ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="<?php echo esc_url($tickets_url); ?>" target="_blank"><span class="text"><?php _e('RESERVAR PLA?A', 'events-maker'); ?></span></a></p> <?php } ?> <?php } } } ?> <?php // Display button get ticket em_display_event_tickets_url(); ?>
Forum: Plugins
In reply to: [Events Maker by dFactory] Delete event ticket link in a past eventI’m getting this error:
Call to undefined function add_filters() in…
I display events url in my content-single-event template like this:
<?php if (!function_exists('em_display_event_tickets_url')){ function em_display_event_tickets_url($post_id = 0){ $post_id = (int)(empty($post_id) ? get_the_ID() : $post_id); $tickets_url = get_post_meta($post_id, '_event_tickets_url', true); if ($tickets_url) : ?> <?php if(ICL_LANGUAGE_CODE=='es') { ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="<?php echo esc_url($tickets_url); ?>" target="_blank"><span class="text"><?php _e('RESERVAR PLAZA', 'events-maker'); ?></span></a></p> <?php }elseif(ICL_LANGUAGE_CODE=='ca'){ ?> <p class="curso_btn"><a class="sf-button standard accent standard ml0" href="<?php echo esc_url($tickets_url); ?>" target="_blank"><span class="text"><?php _e('RESERVAR PLA?A', 'events-maker'); ?></span></a></p> <?php } ?> <?php endif; } } ?> <?php // Display button get ticket em_display_event_tickets_url(); ?>
Am I doing somthing in a bad way?
Thanks so much for the help.
Forum: Plugins
In reply to: [Sociable] Sociable counters cssI would change the appearance of the facebook, Twitter and Google + counters
Viewing 5 replies - 1 through 5 (of 5 total)