error message

Home Forums Calendar Products Events Calendar PRO error message

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #125182
    gregoiregarneau
    Participant

    Hello 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

    #126266
    Brook
    Participant

    Howdy 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

    #126273
    gregoiregarneau
    Participant

    Hi 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

    #126359
    Brook
    Participant

    Ahh, 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

    #126494
    gregoiregarneau
    Participant

    Yes, 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…

    #126559
    gregoiregarneau
    Participant

    Finely 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

    #126997
    Brook
    Participant

    The 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘error message’ is closed to new replies.