Linking the List-Image

Home Forums Calendar Products Events Calendar PRO Linking the List-Image

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1163333
    Nikolaus
    Participant

    Hi,

    can you please tell me, where to link the Picture (a) to the target the headline (b) links to?

    It is a certain file, that can not reside in the child-themes folder, so i unfortunately lost the link when updating. And i unfortunately can not find my memo too.

    I think i remember it was in one of the general.php files.

    Thank You!

    #1163931
    Nico
    Member

    Hi there Nikolaus,

    Thanks for getting in touch with us!

    I was reviewing this in your site and I can see the two different links. Is the heading linking to the ‘Event Website’ field?

    Do you need to tweak this for list view or other views as well?

    Please let me know about it,
    Best,
    Nico

    #1166635
    Nikolaus
    Participant

    Hallo,

    sorry – been on hoöidays for some days.

    1. Yes, it is linking to the event website, and the image has to link there too.

    2. how can i set the h2 of trhe mini-calendar startpage (http://www.labelpack.de/) to link to a new tab (_blank)?

    3. How do you deal with the fact that some users need a second licence for the development-server?

    Thank You
    Niko

    • This reply was modified 7 years, 7 months ago by Nikolaus.
    #1167625
    Nico
    Member

    Hey Niko,

    No problem with the delay, hope you had a great time away from the computer!

    1. Yes, it is linking to the event website, and the image has to link there too.

    Just not sure of the best way of doing this right now. Let me check with a bit more time and I’ll get back to you.

    2. how can i set the h2 of trhe mini-calendar startpage (http://www.labelpack.de/) to link to a new tab (_blank)?

    For this you’ll need to create a template override (as described in our themer’s guide) of the file: ‘events-calendar-pro/src/views/pro/widgets/modules/single-event.php’ and add the target="_blank" to the link in line 44. If you prefer not to do a template override for this then I can develop a JS function that adds the attribute after the page loads.

    3. How do you deal with the fact that some users need a second licence for the development-server?

    You can move your licenses around if you need to → Moving your license keys. I would recommend setting the keys in the development server, so you can test the updates safely in there and then deploying the plugin folders to the live site. Also, if you are not being affected by a critical bug that an update fixes, you can do this once or twice a month. That’s my personal opinion!

    I’ll get back to you tomorrow with a solution for #1,
    Best,
    Nico

    #1168836
    Nico
    Member

    Niko,

    Thanks for the patience while I looked into this!

    1. Yes, it is linking to the event website, and the image has to link there too.

    The code below hijacks all call to the event link, and if possible changes the URL to point to the website URL instead. This will affect the image link as well as title links.

    /* Tribe, change event link to event website */
    function tribe_hijack_event_link ( $link, $postId, $full_link, $url ) {

    $url = tribe_get_event_website_url( $postId );

    if ( $full_link ) {
    $title_args = array( 'post' => $postId, 'echo' => false );
    $name = get_the_title( $postId );
    $attr_title = the_title_attribute( $title_args );
    $link = ! empty( $url ) && ! empty( $name ) ? '' . $name . '' : false;
    } else {
    $link = $url;
    }

    return $link;
    }

    add_filter( 'tribe_get_event_link', 'tribe_hijack_event_link', 10, 4 );

    Just paste the code in your theme’s (or child theme’s) functions.php file and let me know if it works for you,
    Best,
    Nico

    #1172993
    Nikolaus
    Participant

    Hello and sorry – due to too heavyly working I missed coming back to this:

    Thank you very much for this code, but it comes leads to an error in the line:

    $title_args = array( ‘post’ => $postId, ‘echo’ => false );

    The error is:

    Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /kunden/464205_79261/webseiten/wordpress/wp-content/themes/Avada-Child-Theme/functions.php on line 41

    May be you can just tell me the .php-file (i think it was something with “general”) and the expression I have to change there.

    I need the changes for the calendar list-view and the mini-calendar, where the logos have NOT to point to the single-event-page BUT have to lead to the Event Website thru _blank

    Thank you!

    #1173376
    Nico
    Member

    Hey Niko,

    Thanks for following up! No worries on the delay 😉

    I guess the error might be due to formatting issue from copying the snippet directly from the forum (I’ve re-checked that the code is working on my end). Can you try copying/pasting from this GitHub Gist instead?

    https://gist.github.com/niconerd/a99d6054933cf6c868ee7a6ae2801ddb

    Regarding where this needs to work, let’s try to make it work at all and then we can add some view conditionals!

    Please let me know if it works now,
    Best,
    Nico

    #1184474
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Linking the List-Image’ is closed to new replies.