Forum Replies Created
-
AuthorPosts
-
Hans-Gerd
ParticipantHi Cliff,
thanks for answer and your assistance.you have had that code snippet in place all this time
yes
here the snippet in functions.php:add_action('tribe_events_template', 'avia_events_tempalte_paths', 10, 2); function avia_events_tempalte_paths($file, $template) { $redirect = array('default-template.php' , 'single-event.php' , 'pro/map.php' ); if(in_array($template, $redirect)) { $file = AVIA_EVENT_PATH . "views/".$template; } return $file; }since updating to 4.2.5, the code snippet no longer works as it did before
yes – absolutely
adding the line 624 edit you previously mentioned in version 4.2.5 makes your snippet work again
No, this is not correct: Deleting the following code in version 4.2.5. In 4. 2. 4 this was not yet in ..\the-events-calendar\src\Tribe\templates.php
} else { $file = apply_filters( 'tribe_events_template', $file, $template ); }Best regards
Hans-GerdHans-Gerd
ParticipantHi Cliff,
thanks for answer.I saw a code snippet at each of those links. Did using one of those make things work for you?
We have used the code snippet from the first link since the conversion on enfold as theme.
Without this snippet the sidebar will not be shown till TEC 4.2.4.
Since TEC 4.2.5 it doesn’t work any more. It is not executed ‘default-template.php’ and ‘single event.php’ any more from child theme (including code to show the sidebar), but from parent theme.If deleting the snippet from ..\the-events-calendar\src\Tribe\templates.php in TEC 4.2.5 as described above anything works fine and the sidebar is shown.
Unfortunately I didn’t received up to now an answer from kriesi.
Beste regards
Hans-Gerd-
This reply was modified 9 years, 8 months ago by
Hans-Gerd.
Hans-Gerd
ParticipantHi Cliff,
sorry that I write here once more, but I think that I have found a possible cause:The reason for missing sidebar seem to be the file ..\the-events-calendar\src\Tribe\templates.php:
There is encoded from line 624 following in the version 4.2.5:} else { $file = apply_filters( 'tribe_events_template', $file, $template ); }When exchanging this file for the file from 4.2.4, everything is OK (also possibly it is to extinguish the abovementioned lines).
May be it has to do with the fact that the child theme path is wrong. But I tested some possibilities wihtout success.
See here:
andOur child path is: ../wp-content/themes/enfold-childtheme_1/
In this path the files ‘default-template.php’ and ‘single-event.php’ from enfold are stored.Thank you for your patience.
Best regards
Hans-GerdHans-Gerd
ParticipantThis reply is private.
Hans-Gerd
ParticipantThis reply is private.
Hans-Gerd
ParticipantHi Cliff,
thanks for answer.
I will check this with the support of enfold and contact perhaps here again.Best regards
Hans-GerdHans-Gerd
ParticipantHi Nico,
another better solution:<?php // get events count for every event category $kategorie = tribe_meta_event_category_name(); // change name of category, if name and slug is not identical: if ($kategorie == 'XXLPremium') { $kategorie = 'premium'; } // category name is empty if ($kategorie != '') { echo $kategorie . ': '; echo tribe_count_by_cat($kategorie) . ' Veranstaltungen'; } ?>Best regards
Hans-GerdHans-Gerd
ParticipantHi Nico,
I have found the solution – changed in loop.php:<?php // get events count for every event category $kategorie = tribe_meta_event_category_name(); echo tribe_count_by_cat($kategorie) . ' Veranstaltungen'; ?>Many thanks for assistance and best regards
Hans-GerdHans-Gerd
ParticipantHi Nico,
thanks for answer.So you want to pull the current category from the URL? And if there’s no category just return an empty string?
yes, this is exactly that what I need.
Best regards
Hans-Gerd-
This reply was modified 9 years, 9 months ago by
Hans-Gerd.
Hans-Gerd
ParticipantHi Nico,
great – it works. Many thanks for assistance.There is only a little problem: I would like to receive the category automatically
instead of:
echo tribe_count_by_cat('sports');
this one:
echo tribe_count_by_cat('what_ever_I_need');For example:
../events/category/terminanzeige/
or
../events/category/Ferien/Best regards
Hans-GerdHans-Gerd
ParticipantThis reply is private.
Hans-Gerd
ParticipantThis reply is private.
Hans-Gerd
ParticipantThis reply is private.
Hans-Gerd
ParticipantThis reply is private.
-
This reply was modified 9 years, 10 months ago by
Hans-Gerd.
Hans-Gerd
ParticipantThis reply is private.
-
This reply was modified 9 years, 8 months ago by
-
AuthorPosts
