Hans-Gerd

Forum Replies Created

Viewing 15 posts - 181 through 195 (of 320 total)
  • Author
    Posts
  • in reply to: Sidebar not visible after updating TEC to 4.2.5 #1155180
    Hans-Gerd
    Participant

    Hi 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-Gerd

    in reply to: Sidebar not visible after updating TEC to 4.2.5 #1154664
    Hans-Gerd
    Participant

    Hi 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.
    in reply to: Sidebar not visible after updating TEC to 4.2.5 #1154113
    Hans-Gerd
    Participant

    Hi 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:

    How to display the sidebar in Events Calendar pages?


    and

    The event calendar issues

    Our 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-Gerd

    in reply to: Sidebar not visible after updating TEC to 4.2.5 #1153627
    Hans-Gerd
    Participant

    This reply is private.

    in reply to: Sidebar not visible after updating TEC to 4.2.5 #1153563
    Hans-Gerd
    Participant

    This reply is private.

    in reply to: Sidebar not visible after updating TEC to 4.2.5 #1153494
    Hans-Gerd
    Participant

    Hi Cliff,
    thanks for answer.
    I will check this with the support of enfold and contact perhaps here again.

    Best regards
    Hans-Gerd

    in reply to: Counting posts #1143577
    Hans-Gerd
    Participant

    Hi 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-Gerd

    in reply to: Counting posts #1143285
    Hans-Gerd
    Participant

    Hi 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-Gerd

    in reply to: Counting posts #1143283
    Hans-Gerd
    Participant

    Hi 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.
    in reply to: Counting posts #1143160
    Hans-Gerd
    Participant

    Hi 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-Gerd

    in reply to: Search not working #1135473
    Hans-Gerd
    Participant

    This reply is private.

    in reply to: Search not working #1135156
    Hans-Gerd
    Participant

    This reply is private.

    in reply to: Search not working #1133997
    Hans-Gerd
    Participant

    This reply is private.

    in reply to: Search not working #1133786
    Hans-Gerd
    Participant

    This reply is private.

    • This reply was modified 9 years, 10 months ago by Hans-Gerd.
    in reply to: Search not working #1133706
    Hans-Gerd
    Participant

    This reply is private.

Viewing 15 posts - 181 through 195 (of 320 total)