WordPress.org

Ready to get started?Download WordPress

Forums

How to set terms per page for a custom taxonomy in the backend (2 posts)

  1. Tim Brugman
    Member
    Posted 4 months ago #

    How do I set the number of terms per page on custom taxonomies in the wp-admin? (screenshot)

    I've tried various combinations of $query->set(), $query->query[''], $query->query_vars[''], $query->tax_query, $tax_query->set, posts_per_page, showposts, numberposts, etc in this method with no success.

    function prefix_admin_pagination( $query )
    {
    // code
    }
    add_action( 'pre_get_posts', 'prefix_admin_pagination' );

    I read peoples success 'stories' doing something similar for backend posts and toxonomies, frontend posts, tsxonomies and custom taxonomies, but nobody seemed to be doing backend custom taxonomies.

  2. Tim Brugman
    Member
    Posted 3 months ago #

    I found the user can set his preference for this in Screen Options, however I removed this to avoid confusion and I'd like to keep it removed.

    This did help me find where the setting was stored (edit_sectors_per_page).

    screenshot

    This is a user preference, I'm looking to set a site-wide default. I tried adding edit_sectors_per_page and sectors_per_page to the _options table but that didn't work.

Reply

You must log in to post.

About this Topic