WordPress.org

Ready to get started?Download WordPress

Forums

posts_per_pages and AJAX problem (1 post)

  1. wordpress_liker
    Member
    Posted 1 year ago #

    Hi everybody!

    I have a Ajax-based products catalog and i want to make a select box to choose posts per page count. After choosing a count page is refreshing with a new $_GET parameter 'posts_per_page'. I doing it this way:

    $query_param['posts_per_page'] = isset($_REQUEST['posts_per_page']) ? $_REQUEST['posts_per_page'] : get_option('posts_per_page');
    global $query;
    $query = new WP_Query($query_param);

    but my posts per page count still getting from options default.
    My full code of AJAX-refresh catalog is http://pastebin.com/wXm64VmJ.

    How could i fix it? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by wordpress_liker
  • This topic is not resolved
  • WordPress version: 3.4.1