Adding a logo to the organizer section on event pages

Home Forums Calendar Products Events Calendar PRO Adding a logo to the organizer section on event pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1110209
    Rebecca
    Participant

    Hi,

    I am wondering if there is a way to replace the event organizer(s) with a logo, rather than the name, telephone, and email on the organizer section of the event pages. I have looked through the knowledge base section and found the add custom fields to your organizer page, but have not been able to figure out how that works. Please let me know if I am on the right track, or if there is another way to accomplish what I am trying to do.

    Thanks

    #1110475
    Nico
    Member

    Howdy Rebecca,

    Welcome to our support forums and thanks for reaching out to us!

    To add an image to the organizer you’ll need to enable featured image support for the organizer post type. You can do so by adding the snippet below to your theme functions.php file:


    /**
    * Enables the Thumbnail support for Organizer edit screen.
    */
    function tribe_add_thumbnail_support_organizer() {
    add_post_type_support( 'tribe_organizer', 'thumbnail' );
    }
    add_action( 'init', 'tribe_add_thumbnail_support_organizer' );

    Once the code is in place you’ll see the option to add an image to the organizer in the back-end.

    To display the image in the event’s meta section and to remove other fields from the organizer, you’ll need to create a template override (check our themer’s guide for details on this) of the template that renders the organizer info. The file for it is locate at /wp-content/plugins/the-events-calendar/srv/views/modules/meta/organizer.php, once you have the copy of the file in your theme folder, just goahead and remove the lines that out put other venue info and add the following code instead:


    echo get_the_post_thumbnail ( $organizer );

    Please give try a try and let me know about it,
    Best,
    Nico

    #1111295
    Rebecca
    Participant

    Thanks, this worked perfectly.

    I have another question for you. I would like to change the Related Events label at the bottom of the event page to ‘Upcoming Events’. I found the knowledgebase article on changing any string; however, I was unsuccessful in making this work. Can you help?

    Best

    #1111398
    Nico
    Member

    Glad to hear you could work that out ๐Ÿ™‚

    Regarding the change to related events, this snippet is working in my local install. Try pasting it to functions.php file:


    /**
    * Change related events to similar events
    */
    function tribe_custom_theme_text ( $translations, $text, $domain ) {

    $custom_text = array(
    'Related %s' => 'Similar %s',
    );

    if((strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0) && array_key_exists($text, $custom_text) ) {
    $text = $custom_text[$text];
    }

    return $text;
    }
    add_filter('gettext', 'tribe_custom_theme_text', 20, 3);

    Have a great weekend,
    Nico

    #1111672
    Rebecca
    Participant

    Again, it worked perfectly.

    Thank you for your help.

    #1112173
    Nico
    Member

    You are welcome Rebecca, glad to be of service ๐Ÿ™‚

    Iโ€™ll go ahead and close out this thread, but if you need help with anything else please donโ€™t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Adding a logo to the organizer section on event pages’ is closed to new replies.