Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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

    #218225

    Hi 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!
    Peter

    #218734

    Hmm, 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.
    #218878

    Hey!

    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,
    Peter

    #219335

    Thanks,

    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?

    #219500

    I 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Wrong Page Title – Events Manager Category’ is closed to new replies.