hi guys,
this was previously in now closed thread https://kriesi.at/support/topic/function-not-working-change-page-title/#post-654563
function has stopped working since the latest update. any ideas?
thanks
Hi clairemartindigital!
Thank you for using Enfold.
function custom_title_code(){
?>
<script>
jQuery(window).load(function(){
// Get page title
var pageTitle = jQuery("title").text();
jQuery("title").text("Don't forget to read this...");
// Change page title back on focus
jQuery(window).focus(function() {
jQuery("title").text(pageTitle);
});
});
</script>
<?php
}
add_action('wp_footer', 'custom_title_code');
You should be aware of the disadvantages of this trick. http://plainmade.com/blog/14129/please-stop-the-title-swapping
For example, if the user opens two or more pages/posts from your website in new tabs, all tab titles will show the same “Don’t forget…” message.
This makes navigating around a bit tricky, and can apparently cause a few problems when using some bookmark apps (check out this post to learn more).
Cheers!
Ismael
you can close this one. thx