Forum Replies Created
-
AuthorPosts
-
Dinah
ParticipantMathew,
Geoff,thank you so much! I directly changed it and instead of having it still in 6 files
tribe-events/month/content.php
tribe-events/day/content.php
tribe-events/list/content.php
tribe-events/pro/week/content.php
tribe-events/pro/map/content.php
tribe-events/pro/photo/content.phpI just had to put it one time in the functions.php <3
Great! Because I wanted to keep the export buttons on the event detail page I just commented out the single_event_links parts – works well 🙂
/** * Prevent calendar export links from showing anywhere on the front-end. */ class Tribe__Events__Remove__Export__Links { public function __construct() { /*add_action( 'init', array( $this, 'single_event_links' ) ); */ add_action( 'init', array( $this, 'view_links' ) ); } /* public function single_event_links() { remove_action( 'tribe_events_single_event_after_the_content', array( $this->ical_provider(), 'single_event_links' ) ); } */ public function view_links() { remove_filter( 'tribe_events_after_footer', array( $this->ical_provider(), 'maybe_add_link' ) ); } protected function ical_provider() { return function_exists( 'tribe' ) ? tribe( 'tec.iCal' ) // Current : 'Tribe__Events__iCal'; // Legacy } } new Tribe__Events__Remove__Export__Links();Best regards,
DinahDinah
ParticipantOk, I should check my glasses 😉 I found it in:
tribe-events/month/content.php
tribe-events/day/content.php
tribe-events/list/content.phpIt is the “do_action( ‘tribe_events_after_footer’ )” part at the bottom (around line 58):
<!-- #tribe-events-footer --> <?php //delete it or make it a comment to not show the export button any longer on views //do_action( 'tribe_events_after_footer' ) ?>Best regards,
DinahOctober 9, 2016 at 1:11 pm in reply to: Custom fields: formatting URL without changing the type to "text" #1174306Dinah
Participant😀 I resolved it by myself!
<?php foreach ( $fields as $name => $value ): ?> <dt> <?php echo esc_html( $name ); ?> </dt> <dd class="tribe-meta-value"> <?php // prüfen ob das der Wert des Custom Fields = Anmeldung ist, dann Link formatieren if ( $value == $fields['Anmeldung'] ) { echo "<a href='$value' class='tribe-events-button' target='_blank'>Jetzt anmelden !</a>"; // andernfalls die Ausgabe ganz normal fortführen } else { echo $value; } ?> </dd> <?php endforeach ?>Many thanks, this ticket can be closed.
Best regards, Dinah
October 9, 2016 at 11:37 am in reply to: Event detail page "URL" should contain target="_blank" #1174294Dinah
ParticipantSorry, my fault – I hadn’t pasted the code correctly into the functions.php. It is resolved.
October 9, 2016 at 11:27 am in reply to: Event detail page "URL" should contain target="_blank" #1174289Dinah
ParticipantHi Cliff,
sorry I was too fast :-/ Unfortunately there is another problem now.
I pasted your code into my child-themes’ function.php and it really worked well – all links open up in a new window – as expected… BUT… each time I try to update a post in the wp backend the following error message appears:
Warning: Cannot modify header information – headers already sent by…
What did I do wrong? Or maybe did I misunderstand you in how to use your code?
October 9, 2016 at 7:39 am in reply to: Event detail page "URL" should contain target="_blank" #1174222Dinah
ParticipantThank you very much, Cliff! That works 🙂
-
AuthorPosts
