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

  1. Tim Brugman
    Posted 1 year 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
    Posted 1 year 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).


    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.

Topic Closed

This topic has been closed to new replies.

About this Topic