• Resolved Anonymous User 4309634

    (@anonymized-4309634)


    I’m using this plugin here – http://www.regimentfitness.co.uk/eventspage/ (the page isn’t live yet so I’m still playing around with it).

    The plugin is great but the one issue I can’t solve is that the page title in the list view isn’t “Events” or “Events Page” as I have specified in the page I’ve created, but instead the page takes the title of the first event. I’m presuming that this is because the plugin doesn’t actually use an existing page but rather creates one so there is actually no page title specified. There must be a way to change this but I can’t find anywhere in the template files!

    Would appreciate some help.

    Thanks

    http://wordpress.org/extend/plugins/the-events-calendar/

Viewing 15 replies - 16 through 30 (of 33 total)
  • Bradley Allen or British Holiday Direct – I am a true beginner at code editing, so I apologize for my lack of knowledge! Could you explain to me exactly how you changed line 637 in the the-events-calendar.class.php file so the header would display “upcoming events” instead of pulling the title of your next event and placing that in the header?

    Thanks!

    Nice work, Bradley! Thanks for the assist on that man, glad to hear you were able to get britishholidaysdirect where they need to be.

    GRSblog4: have you popped open the-events-calendar.class.php in a text editor of your choosing yet?

    I figured it out. I had to edit my code in my theme, no in the plugin. My theme was over-riding all the changes I was making to the plugin directly.

    Thank you!

    Great! Thanks for confirming as much here, grsblog4. We appreciate it as well as your use of the plugin. Looks like we’re all set with this thread but if you need anything else in the future please let us know, and we’ll do our best to assist.

    Thanks again, everyone. Closing this out.

    Did anyone ever figure out how to fix this on the U-Design theme?

    I’d like to get the Pro version but I couldn’t justify that until this design bug is fixed without having to hack my theme.

    Do you find this still happens on 2.0.9, bocan? If you follow Bradley’s steps, you shouldn’t have to hack the theme – it’s just a file within the plugin itself. Let me know if I’m misunderstood here though.

    I tried Bradley’s change but it doesn’t seem to do anything when the U-Design theme is activated. grsblog4 seems to have found the solution but didn’t give details.

    Bocan – My fix might not be what you are looking for. WIth the code I edited, the top of every page reads “Green Ribbon Schools” in the header banner. It isn’t the ideal situation, but it is enough to get by until I find a better fix.

    I don’t know if this will help you at all, but I added this code to the header.php

    <?php } else { echo ‘Green Ribbon Schools’; } ?>

    Twig

    (@palpatine1976)

    I’m not sure if this is what you guys are looking for, but EC provides a filter to set the page title that you can override in your functions.php:


    function childtheme_get_events_title($content) {
    if (tribe_is_upcoming()) {
    $content = 'Some Upcoming Title';
    }
    else if (tribe_is_month()) {
    $content = 'Some Calendar Title';
    };
    return $content;
    }
    add_filter('tribe_get_events_title', 'childtheme_get_events_title');

    This PAGE title is NOT the same thing as the HTML DOCUMENT title (i.e. the string in the <title> tag) – I’m still searching for a solution to the issue of the next Event populating the html title.

    Can anyone tell me exactly what to change on line 637 to what?

    Thanks,

    Ian

    Thanks for the tips on this so far, guys. Hopefully this is adding value to others as they work on this for now. To address Ian’s comment…you’ll probably want to change this:

    public function maybeAddEventTitle($title, $sep = null){
    if(get_query_var('eventDisplay') == 'upcoming'){
    $new_title = apply_filters( 'tribe_upcoming_events_title', __("Upcoming Events", 'tribe-events-calendar'). ' '.$sep . ' ' . $title, $sep );

    That help?

    I just noticed I also have this problem.

    roblagatta, I’ve found those three lines of code in the PHP file but I’m not sure what to change exactly. I know CSS and HTML but PHP is like a foreign language to me. Can someone help?

    Same here.

    I have found it in this file but not sure what to change.

    HELP please!

    hellooooooo… anybody here???

    i have updated the plugin and it still shows the first event title as a title page.

    can somebody help us all or should we just flush it down the loo???

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘[Plugin: The Events Calendar] Events Page Title’ is closed to new replies.