-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL injecting with Ajax #6
Comments
I have the same issue, is there any solution? |
I've fixed it... copy and paste the code in your files and try |
I just uploaded my theme on the hosting server, it is working fine there. It means, it is creating problem with localhost. |
the problem isn't with local host or server |
when the site is in a subdirectory the URL is not working probably in the index but works fine in archive page cause we preset the URL with "data-archive" and passing it...
for example is the site URL is
http://localhost/wordpress
in the homepage when scrolling to first div of "page-limit" the URL becomes
http://localhost/
or when load more becomes
http://localhost/page/2
So here's my solution I hope it's good
in index
`
in sunset.js
`$(document).on('click','.sunset-load-more:not(.loading)', function(){
in ajax.php
`function sunset_load_more()
{
$paged = $_POST['page'] + 1;
$prev = $_POST['prev'];
$archive = $_POST['archive'];
}
and as improvment in archive.php
what I did is passing the full URL like you did in archive.php
I passed the full URL even in index...
I hope you see it and tell if there's something wrong in my code
The text was updated successfully, but these errors were encountered: