is_single() conditional check inside ajax php function
is_single returns if there is a single page displayed within the actual server process. Within the Ajax-Function, nothing is “displayed”, you’re doing Ajax. To check if the currently displayed object in your Browser is a single object, you need to transfer the information about this from the server process that serves your Browser to the … Read more