Home › Forums › Calendar Products › Events Calendar PRO › error message
- This topic has 6 replies, 2 voices, and was last updated 12 years ago by
Brook.
-
AuthorPosts
-
March 31, 2014 at 7:13 am #125182
gregoiregarneau
ParticipantHello there,
My website doen’t work this morning and have got a message error. i have to erase this line from my fonction.php file in my theme.
add_shortcode(‘event_category_link’, ‘event_category_link_shortcode’);
remove_action(‘tribe_events_single_event_after_the_meta’, array(TribeWooTickets::get_instance(), ‘front_end_tickets_form’));
add_action(‘tribe_events_single_event_after_the_content’, array(TribeWooTickets::get_instance(), ‘front_end_tickets_form’));add_action( ‘init’, ‘tribe_events_wootheme_compatibility’ );
function tribe_events_wootheme_compatibility() {
if ( ! is_home() ) {
remove_filter( ‘pre_get_posts’, ‘woo_exclude_categories_homepage’, 10 );
}Do you khow what i am suppose to do ?
Thank you
Grégoire
April 1, 2014 at 11:35 am #126266Brook
ParticipantHowdy gregoiregarneau,
Sadly we can not help too much with customizations like that. It will be up to you to diagnose.
That said, maybe I can help a little bit. What specifically is the error message and line numbers referenced. Who wrote that code, was it a snippet one of us here at Tribe wrote?
– Brook
April 1, 2014 at 11:41 am #126273gregoiregarneau
ParticipantHi Brook,
I don’t khow where it’s coming from and i don’t khow how write it ! Maby Tribe because i never put someone for coding my site ! I erase everything… The message was warning something doen’t work on functions.php line 72 …
did that help you ?Grégoire
April 1, 2014 at 1:10 pm #126359Brook
ParticipantAhh, thanks for the update Grégoire. If I understand you correctly when you remove the code that you mentioned in your original post (that you found in your functions.php file) everything works without errors. If you did not add that code yourself, then the code is completely unnecessary for you site. You should just remove it, and thus avoid any errors that you are seeing. With the errors gone it seems like your site is now working perfectly and thus your problem is fixed. Does that make sense?
– Brook
April 1, 2014 at 3:20 pm #126494gregoiregarneau
ParticipantYes, but now, i see a probleme in my post… Look here, all the post is gone but it was in the admin… http://www.neurogymtonik.org/stress-et-developpement-cerebral/
I think this problem is du because i erase the code…April 1, 2014 at 5:13 pm #126559gregoiregarneau
ParticipantFinely it’s ok in my post… I refresh my theme and it’s ok…
But i still don’t khow for what reason this code was in the function file…/**
* Handler for event_category_link shortcode.
* Usage: [event_category_link slug=”my-category-slug”]
*
* If the slug is invalid or isn’t provided then it will
* return empty.
*
* @param $args
* @return string
*/
function event_category_link_shortcode($args) {
// We need TribeEvents to have loaded and a slug to have been passed in
if (!class_exists(‘TribeEvents’)) return;
if (empty($args) or !isset($args[‘slug’])) return;// Try to load the term, return empty if it can’t be found
$term = get_term_by(‘slug’, $args[‘slug’], TribeEvents::TAXONOMY);
if (!$term || !is_object($term)) return;// Get the link
$url = TribeEvents::instance()->getLink(‘upcoming’, false, $term->term_id);
$link = ‘ ‘ . esc_html($term->name) . ‘ ‘;return $link;
}add_shortcode(‘event_category_link’, ‘event_category_link_shortcode’);
remove_action(‘tribe_events_single_event_after_the_meta’, array(TribeWooTickets::get_instance(), ‘front_end_tickets_form’));
add_action(‘tribe_events_single_event_after_the_content’, array(TribeWooTickets::get_instance(), ‘front_end_tickets_form’));add_action( ‘init’, ‘tribe_events_wootheme_compatibility’ );
function tribe_events_wootheme_compatibility() {
if ( ! is_home() ) {
remove_filter( ‘pre_get_posts’, ‘woo_exclude_categories_homepage’, 10 );
}
}
Have you one ideas ?Thank’s
Grégoire
April 2, 2014 at 10:57 am #126997Brook
ParticipantThe main thing it does is it moves the WooTickets purchase area from below the Event Details box to above it. It looks like someone at sometime added it to create a small visual customization. If you are currently happy with how the Single Events page looks, you should be fine to just leave that code removed.
You are very welcome. Let me know when this issue is completely resolved for you, then we can mark this topic answered.
– Brook
-
AuthorPosts
- The topic ‘error message’ is closed to new replies.
