WordPress.org

Ready to get started?Download WordPress

Forums

DB Posts per page
Admin page list affected by plugin! (2 posts)

  1. johnegg
    Member
    Posted 1 year ago #

    Hi there. Great plugin however when its enabled if I go to 'admin - pages' I can only see the first 12 (or whatever number I set) pages listed in the backend so i cant edit any pages beyond that. I need to deactivate the plugin in order to edit pages in backend.

    Help!

    chers
    john

    http://wordpress.org/extend/plugins/db-posts-per-page/

  2. chmchm
    Member
    Posted 8 months ago #

    Add the if ! admin to the function and it doesn't affect the admin pages!

    like this!

    function db_post_per_page_set() {
    	global $wp_query;
    	  if (!is_admin()){
    	if( isset( $_COOKIE['db_posts_per_page'] ) ) {
    		$wp_query->query_vars['posts_per_page'] = $_COOKIE['db_posts_per_page'];
    	}
    }
    }

    Happy Coding!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic