Hi,
I faced a similar issue for one of my clients, and fixed in few hours. I Guess your website is in Below model
Wordpress + PHP + MySQL, that casues the problem, some tweaking will help you.
Please award and create the milestone, your job is completed in few hours.
Please ping for chat, if you have questions.
Regards,
Param