Functions than depending on wp_query global not working with AJAX

I have an ajax infinite scroll posts system and I have a problem that the posts that loaded by the system some function not working with it.

Example:

I want to appear a message if the current page is a singular post so I used this function is_singular( ‘post’ ) inside the loop template.

The posts that loaded without the infinite posts system everything working without any issues but the posts that loaded by the infinite posts system the function that depending on wp_query, not working.

Any advice?

Read more here:: Functions than depending on wp_query global not working with AJAX

Leave a Reply

Your email address will not be published. Required fields are marked *