Ajax WordPress pass post URLs
Yes that would be easy. You can use the get_the_permalink() function to retrieve a post’s link. Here’s how to do it: // You are storing the post data here $posts_arr[] = $post; // Add the URL to the same array element $posts_arr[][‘url’] = get_the_permalink(); You can get the index of the current post in the … Read more