I am working a project of WordPress
and I want to execute two functions on certain conditions.
1st function will be executed when the blog single post page is opened in browser and 2nd will be when that page is closed and navigated to another one from that page.
I know I can use is_single()
method to check whether the page is opened of single post but for closing or navigating to another page I can use JavaScript
also..
but i want to have better options than mine if anyone knows.
I really want the answer so please if anyone can help do share your views.
Thanks in advance.. and sorry cause I am not a native English speaker..if you find mistakes in my question.