Tagged: page title
-
AuthorPosts
-
January 31, 2014 at 6:02 pm #217562
Hi,
I’m using Events Manager Pro and I’m having problems with the title of event categories.
Event categories use the page.php template file. There the avia_title function is called to generate the page title.
For some reason, event categories get the Title of one of my events. It seems that the avia_title function is pulling from the event loop in stead of the page loop.Sample page: http://wptest.alcadis.nl/agenda/events/
Is there a way to fix this?
Ps. I allready contacted the plugin developers. Since it’s a theme problem, they weren’t able to fix this.
Thanks
February 1, 2014 at 11:33 am #218225Hi Alcadis!
It’s actually not a theme problem but a limitation of The Events Calendar plugin. However I posted a workaround here: https://kriesi.at/support/topic/enfold-and-the-event-calendar-plugin/#post-174332
Cheers!
PeterFebruary 3, 2014 at 11:26 am #218734Hmm, I don’t really understand on how to implement this.
For the record, I’m using Events Manager Pro, not The Events Calendar
- This reply was modified 10 years, 9 months ago by Alcadis.
February 3, 2014 at 5:34 pm #218878Hey!
Oh, ok. The code varies a bit if you use Events Manager Pro. Insert following code at the very bottom of enfold/functions.php or into your child theme functions.php
add_filter('avf_title_args', 'fix_events_page_title', 10, 2); function fix_events_page_title($args,$id) { if (get_query_var('post_type') == 'event' && !is_single()) { $args['title'] = 'Events'; } return $args; }
You can replace “Events” with any other custom title/text.
Best regards,
PeterFebruary 4, 2014 at 1:35 pm #219335Thanks,
I tried this, but for some reason it doesn’t effect the category pages. However, when I remove the !is_single() from the if statement, it does change the titles of single events. Meaning this solution should be able to fix my problem.
I want to check if the page is an eventcategory. If yes, $args[‘title’] should be equal to the category title. Any idea on how to do this?
February 4, 2014 at 5:18 pm #219500I have found a different solution to my problem. Chaning some settings in Event Manger fixed the problem. Only thing is, on the category page, the sidebar disappeared. So now I need to call a specific sidebar.
I’ll make a new topic, since it’s a different problem.
Thanks for the help.
You can mark this as resolved.
-
AuthorPosts
- The topic ‘Wrong Page Title – Events Manager Category’ is closed to new replies.