I have a custom loop: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $works = new WP_Query('category_name=work&posts_per_page=9&paged=' . $paged); Pagination outputs 3 pages, on first there are 9 posts, which...
  • May 19, 2022
  • 0 Comments
I want to add a data argument to links generated by the paginate_links() function. Then, I can more easily extend my custom pagination to use AJAX. As far as...
  • May 15, 2022
  • 0 Comments
My Seach Page URLs: https://www.example.com/search/keyword/page/2/ Here my custom search page: <?php if($_GET['search_text'] && !empty($_GET['search_text'])) { $text = $_GET['search_text']; } else { $text = urldecode( get_query_var('search_text') ) ; } ?>...
  • May 15, 2022
  • 0 Comments