Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1016650

    Hi there,

    At a single events page created using Events Calendar, the H1 is saying exactly the same as H2. The H1 and H2 are obviously both taken from the events title inserted in a single event. So you get:

    H1: Combiles Tai Chi Qigong – Yin Yoga zaterdagochtend Oirschot
    H2: Combiles Tai Chi Qigong – Yin Yoga zaterdagochtend Oirschot

    How can I (overall) change the H1 for single events pages (which is anyway a double text since the H2 says the same) to something static, such as “Activiteiten”? This seems more logic. Then we would get:
    H1: Activiteiten
    H2: Combiles Tai Chi Qigong – Yin Yoga zaterdagochtend Oirschot

    Apart from the more logical H1 and H2, that would also help solving the issue of sometimes way too long H1’s for events on the site…

    I searched the support forum and found advice somewhere to change the enfold-child > config-events-calendar > views > single-event.php, however there is no H1 in this file (anymore > I think it was taken out from the original Events Calendar files to Enfold).

    Can you help me to achieve that?

    Thanks & regards,
    Monique

    #1017289

    Hey Monique,

    Thank you for using Enfold.

    You can find the template in the config-events-calendar -> views > single-event.php file. Look for the “av-single-event-content” container. You should be able to add the h1 tag there.

    Best regards,
    Ismael

    #1017548

    Thanks for your reply Ismael.

    I don’t want to add an H1 to the single event though. There is already and H1, but is reads exactly the same as the H2 on the same page.

    What I want is to change the existing H1 on the single events page from the “events title which is in this case Combiles Tai Chi Qigong – Yin Yoga zaterdagochtend Oirschot” (and which is also already in the H2) to something like “Activiteiten”. However the H1 cannot be found in this file.

    Please advise.

    Best regards,
    Monique

    #1018146

    Hi,

    Thanks for the clarification. You can use the “avf_title_args” filter to modify the main title.

    add_filter('avf_title_args', 'avf_title_args_events_mod', 99, 2);
    function avf_title_args_events_mod($args,$id)
    {
         if ( $args['title'] == get_the_title(get_the_ID()) && is_singular('tribe_events') ) 
         {
            $args['title'] = 'Activiteiten';
         }
        return $args;
    }

    Best regards,
    Ismael

    #1018928

    Ah yes, that works great Ismael!

    Thanks a lot.

    Can you please flag this topic as solved?

    Best regards,
    Monique

    #1019188

    Hi Monique,

    Glad we could help :)

    Best regards,
    Victoria

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Single events page's H1 and H2 have the same text’ is closed to new replies.