i have another question please in the code you mentioned above , should i leave the part of “admin-ajax.php” as you mentioned it ? i did another thing , in the ajax call after retrieving the info i already added an query to increment the views , so it’s already incremented in the database but in the side bar still the same number of views the page should be refreshed in order to update the number of views ,, if i used your code here would it be updated in the bar automatically without refreshing the page ?
i’ve found the solution, the wp_head() was missing in the header..