Tagged: events calendar, H1, h2
-
AuthorPosts
-
October 1, 2018 at 2:59 pm #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 OirschotHow 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 OirschotApart 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,
MoniqueOctober 3, 2018 at 2:18 am #1017289Hey 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,
IsmaelOctober 3, 2018 at 3:24 pm #1017548Thanks 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,
MoniqueOctober 5, 2018 at 6:51 am #1018146Hi,
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,
IsmaelOctober 8, 2018 at 11:38 am #1018928Ah yes, that works great Ismael!
Thanks a lot.
Can you please flag this topic as solved?
Best regards,
MoniqueOctober 8, 2018 at 8:13 pm #1019188Hi Monique,
Glad we could help :)
Best regards,
Victoria -
AuthorPosts
- The topic ‘Single events page's H1 and H2 have the same text’ is closed to new replies.