Skip to content

Instantly share code, notes, and snippets.

@GeoffEW
Created April 24, 2017 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GeoffEW/aed5b070daf3275d7005e8455f59c79c to your computer and use it in GitHub Desktop.
Save GeoffEW/aed5b070daf3275d7005e8455f59c79c to your computer and use it in GitHub Desktop.
Prevents the <title> attribute for the page (displayed in the browser tab) from changing to “Events for <month> <year> – <sitename>” when navigating in a calendar embedded in a page using a full calendar shortcode.
<?php
(function () {
var lastTitle = undefined;
function checkTitle() {
if (lastTitle != document.title) {
document.title = 'My Desired Title';
lastTitle = document.title;
}
setTimeout(checkTitle, 100);
};
checkTitle();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment