Home › Forums › Calendar Products › Events Calendar PRO › Problem with moving the events page title
- This topic has 3 replies, 2 voices, and was last updated 6 years, 9 months ago by David.
-
AuthorPosts
-
June 25, 2017 at 4:29 pm #1304759DavidParticipant
I tried to move
<?php echo tribe_get_events_title() ?>
outside the content.php template to another part of the page, but when the page reloads trough ajax the title doesn’t update anymore.
Do you have any suggestion on how to call ajax or about any other intervention to solve this?
Thank you,
DavidJune 28, 2017 at 7:09 am #1310122BarryMemberHi David,
That’s a great question!
By design, rather than fetching the entire page, we just grab the contents of the #tribe-events-content div. There are a few ways you might workaround this.
The important thing of course is that you communicate the desired title in the ajax responses. You could do this by additionally including the events title in a hidden element, or as a data attribute for an existing element. Alternatively, you could include it in the response data by utilizing the tribe_events_ajax_response filter hook.
Client/browser-side, some Javascript could be setup to listen for successful ajax responses (the ajax-success.tribe event will be triggered) which can then grab that fresh title and use it to overwrite the content of your desired title element.
Does that make sense? Unfortunately we cannot go into too much detail with custom dev questions like this one, but I hope that at least gives you a strategy you can explore further 🙂
July 20, 2017 at 9:35 am #1323892Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Problem with moving the events page title’ is closed to new replies.