WordPress.org

Ready to get started?Download WordPress

Forums

Team Rosters
[resolved] Team players are restricted to 10 (6 posts)

  1. ceviz ms
    Member
    Posted 1 year ago #

    Hello there,

    First of all, lovely plugin! Thank you for your nice work!
    Have two questions;

    1. Only 10 of the team players are displayed in team page. 11th player is ignored:(
    2. Is there a easy way to add Team column to All Players page?

    Actually first question has a bit importance :)

    Thank you for your support!

    http://wordpress.org/extend/plugins/team-rosters/

  2. ceviz ms
    Member
    Posted 1 year ago #

    Adding

    function mstw_tr_gallery_size( $query ) {
        if ( is_admin() || ! $query->is_main_query() )
            return;
    
        if ( is_tax( 'teams' ) ) {
            // Display up to 120 posts for teams taxonomy archive pages
            $query->set( 'posts_per_page', 120 );
            return;
        }
    }
    add_action( 'pre_get_posts', 'mstw_tr_gallery_size', 1 );

    to the themes functions.php solved the issue.

    But not player names are not sorted alphabetically? :(

  3. Mark O'Donnell
    Member
    Plugin Author

    Posted 1 year ago #

    Hi cervis ms,
    Glad you found that fix. I believe the WP default is 5, so I suspect yout theme set 10.

    The sort order - alpha or numeric - can be set on the settings page.

    -Mark

  4. pstevens17
    Member
    Posted 1 year ago #

    I tried adding this code to the theme functions at the top and at the bottom of the code and it didn't help. Using presswork at clippersbaseballsouth.com

  5. pstevens17
    Member
    Posted 1 year ago #

    Fixed my own problem, it added the code to the bottom of the theme function and it worked, thanks!

  6. Mark O'Donnell
    Member
    Plugin Author

    Posted 1 year ago #

    Super. Glad to hear it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic