Follow up to Change Single Event Page Title

Home Forums Calendar Products Events Calendar PRO Follow up to Change Single Event Page Title

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #848070
    sean
    Participant

    Hi Brian,

    Following up on https://theeventscalendar.com/support/forums/topic/change-single-event-page-title/

    After trying to determine why this function was not working on production, I eventually just tried it on a clean install of WordPress (2012 theme with all other plugins deactivated). For some reason, it is not updating the page title and is also throwing an error: Warning: Missing argument 4 for ecp_filter_single_title()

    Any thoughts on why this still wouldn’t be working on my clean install when it was working fine on yours? I’m perplexed…

    #848071
    sean
    Participant

    This reply is private.

    #848746
    Brook
    Participant

    Howdy sean,

    This snippet might work instead: http://pastebin.com/evUKFyHP It does have one caveat, namely that the default title for an upcoming events widget will now be blank. However, you can change it to something, including Upcoming Events, if you prefer.

    Just worth mentioning that the sort of issue you are encountering falls a bit outside of our scope of support. Both Brian and I have provided you snippets we would not normally do. I mention this only because I want you to be aware that in the future we probably will not be able to provide you custom code like that. As outlined in our scope of support we offer guidance, not specific code. You might need a developer, if you are not one, to be able to take that guidance and actually write the code. I hope you understand this going forward. I just did not want you to be disappointed in the future if the level of support changed. At the moment we have gone way beyond what we normally would, because from time to time for nice customer we can. But, it is not something we can do all the time.

    Please let me know if that worked. Cheers!

    – Brook

    #849633
    sean
    Participant

    Hey Brook,

    Thanks for sharing that other option. I tried your snippet and it does work, but since it changes “Upcoming Events” everywhere on the calendar (List View, etc) it unfortunately won’t be one that I can use (I only want to remove “Upcoming Events” from the single page titles). However, I do appreciate you (both) going above and beyond to provide these snippets, as I understand it is beyond the scope of your support and that you aren’t able to do that on a regular basis.

    With that said, I am still unclear as to why the first function is not working on my clean install (2012 theme and only “out of the box” TEC plugins activated). It should be altering the page title on the single event pages, correct?

    Thanks again,
    Sean

    #849798
    Brook
    Participant

    Howdy sean,

    That is correct. I get the feeling a difference in you PHP version or PHP configuration is the problem. That is causing an error, and the error is stopping the script from working properly. According to that error changing the 4 to a 3 might fix things.

    My bad on your request, I did misunderstand slightly. I have not tested this but I bet wrapping the line of code which changes everything to blank ($varname = “”;) in the following conditional if(is_single()) { // insert code here } will work. Of course changing the 4 to a 3 in Brians script might also work. If you have a chance to try that let me know! I do want to get you sorted if at all possible. Cheers!

    – Brook

    #850166
    sean
    Participant

    Thanks Brook! The PHP config must be the source of the issue then. Although changing the 4 to a 3 didn’t work, the revision to your function did remove the “Upcoming Events” from only the single event pages.
    if(is_single() && $text === 'Upcoming Events' && $domain === 'tribe-events-calendar')

    So now the single event page titles are showing as “| Example Event Title | My Site Name:” It isn’t possible to remove the first divider (before the event title) with this snippet though since its a translation, correct? Any gut feeling as to what might be worth changing in my PHP config to allow the original script to run properly? Thanks in advance for any suggestion on that front.

    #858612
    Brook
    Participant

    Howdy sean,

    You are correct. The pipebar is not removable via translations.

    Regarding changes to your config, it could be any number of things. Do you have WP Debug enabled? Might toggle that  though its a long shot. Much easier said than done, but perhaps a different PHP version would make it work as expected. Dabbling with your error reporting settings might fix it, though that is a remote possibility too. From what I am seeing that error should not be there in the first place, and isn’t on our systems. I believe you already mentioned that your WP install is up-to-date, so that rules that out.

    I wish one of our solutions had been easier for you to adapt. 🙁 But, sometimes computers can be frustratingly thick. That’s what have someone on hand to fix it is awesome, when such a luxury is within reach. Thanks for posting!

    – Brook

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Follow up to Change Single Event Page Title’ is closed to new replies.