The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

posts_per_pages and AJAX problem (1 post)

  1. wordpress_liker
    Posted 3 years 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 3 years ago by wordpress_liker
  • This topic is not resolved
  • WordPress version: 3.4.1