Helen

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Helen
    Participant

    Brook, Geoff – you guys are awesomazing!!!!

    That fixed it. Thanks so much.

    Best,

    Helen

    Helen
    Participant

    Hi Brook,

    Thanks for the suggestion. I tried it and unfortunately it doesn’t fix the problem.

    I hadn’t seen your response till today because I was checking my email instead of this thread and I never received a follow-up email. So this puts me in a difficult position because my deadline is fast approaching (like one week fast!) I’m kicking myself!

    I eagerly await your next ninja coding move – this is the last thing I need to fix and I’m done! Help!!!

    Best,

    Helen

    Helen
    Participant

    Thanks Geoff,

    I will hang in there 🙂

    Have a great New Year!!!

    Helen
    Participant

    Hi Geoff,

    Thanks for the help so far. The code to change the wording worked like a charm.

    To list the events alphabetically the code you sent me worked great as well. But I need to modify it a little bit. The titles are names and the client wants the listings to be listed alphabetically by last name but wants the title of the events to be “First Name” then “Last Name.”

    So I figured I’d modify the slug of each event and put the last name first there. Then I modified the code you sent me by placing ‘name’ instead of ‘title’. It works fine for everything except one listing. The first listing is not in the right order (it is the only listing with event dates that start before the rest.) When I change the event dates then it lists in the right place alphabetically.

    Please help!

    – Helen

    Link to page: http://5bc4ac0df1.url-de-test.ws/evenements/categorie/expositions-2017/

    Here is the code in my functions.php file:

    <?php

    // enqueue the child theme stylesheet

    Function wp_schools_enqueue_scripts() {
    wp_register_style( ‘childstyle’, get_stylesheet_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘childstyle’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘wp_schools_enqueue_scripts’, 11);

    function tribe_custom_theme_text ( $translation, $text, $domain ) {

    $custom_text = array(
    ‘Voir les dĂ©tails’ => ‘Voir la suite’,
    );

    // If this text domain starts with “tribe-“, “the-events-“, or “event-” and we have replacement text
    if( (strpos($domain, ‘tribe-‘) === 0 || strpos($domain, ‘the-events-‘) === 0 || strpos($domain, ‘event-‘) === 0) && array_key_exists($translation, $custom_text) ) {
    $translation = $custom_text[$translation];
    }
    return $translation;
    }
    add_filter(‘gettext’, ‘tribe_custom_theme_text’, 20, 3);

    add_action( ‘pre_get_posts’, ‘tribe_post_alphabetical_ordering’, 51 );

    function tribe_post_alphabetical_ordering( $query ) {

    if( tribe_is_upcoming() ) {

    $query->set( ‘orderby’, ‘name’ );
    $query->set( ‘order’, ‘ASC’ );

    }
    }

    Helen
    Participant

    Hi Geoff,

    Thank you for your response. I will try the code snippet right away.

    But I did not express myself clearly in the second question. The wording at the end of the listing is in French already. It says “Voir les dĂ©tails” but I want to change it to “Voir la suite.” How do I do this.

    Thank you.

    English is fine by the way – it’s my first language, my clients are French.

    – Helen

Viewing 5 posts - 1 through 5 (of 5 total)