Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1012203

    Hello
    here is a translation-Issue
    Kalender mit Ereignissem
    https://www.flugtraeumer.de/events

    How to fix that??

    This code does NOT work:

    add_filter('avf_title_args', 'avf_title_args_mod', 99, 2);
    function avf_title_args_mod($args,$id)
    {
         if ( $args['title'] == 'Calendar of Events' ) 
         {
            $args['title'] = 'Veranstaltungskalender';
         }
        return $args;
    }
    #1012374

    Hey Flugtraeumer,

    Thank you for using Enfold.

    You can try this code instead.

    add_filter('avf_title_args', 'avf_title_args_mod', 99, 2);
    function avf_title_args_mod($args,$id)
    {
         if ( $args['title'] == 'Kalender mit Ereignissem' ) 
         {
            $args['title'] = 'Veranstaltungskalender';
         }
        return $args;
    }

    Best regards,
    Ismael

    #1012411

    Hi Ismael
    thanx – that worked.

    Question: What does these two numbers in the code stands for?
    99, 2

    Kind regards danny

    #1012624

    Hi,

    That is the filter execution priority and the accepted arguments or parameters, in this case $args and $id.

    // https://developer.wordpress.org/reference/functions/add_filter/

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.