WordPress.org

Ready to get started?Download WordPress

Forums

Football Pool
[resolved] Only one team matches listing (6 posts)

  1. meXx16
    Member
    Posted 1 year ago #

    Hi,
    I want only one football team matches listing, than Matches. Can i do this anyway a filter or a tagging?

    Sorry for my English.
    Thank you.

    http://wordpress.org/extend/plugins/football-pool/

  2. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,
    There is no out-of-the-box solution for this. But a team page only shows the matches for a particular team. Is this what you want? If so, you can copy that code to a page of your own.

    Example:

    <?php
    // $team_id must be an integer corresponding with the database ID of the team
    $team = new Football_Pool_Team( $team_id );
    $team->get_plays();
    $plays = $team->get_plays();
    if ( count( $plays ) > 0 ) {
    	$matches = new Football_Pool_Matches;
    	$matches->print_matches( $plays );
    }
    ?>
  3. meXx16
    Member
    Posted 1 year ago #

    So many thanks. That's work! :)

  4. meXx16
    Member
    Posted 1 year ago #

    One more question. I want The next prediction widget modificate so that only one team matches are counted back. Solvable?

    Thank You Forward.

  5. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    That would be a small change to some files. I'll include it in my next version.

    p.s. previous code contained a line that isn't needed for the code to work. I guess a copy-paste error.

    <?php
    // $team_id must be an integer corresponding with the database ID of the team
    $team = new Football_Pool_Team( $team_id );
    $plays = $team->get_plays();
    if ( count( $plays ) > 0 ) {
    	$matches = new Football_Pool_Matches;
    	$matches->print_matches( $plays );
    }
    ?>
  6. apresmatch
    Member
    Posted 6 months ago #

    Hello AntoineH,
    I try to use the matche widget in my website but the next matche and the previous matche doesn't appear in the widget. i have the messages "no previous matches" ans "no Upcoming matches" but I'm sure i have 16 matches in the data base. how can u help me please. Give me an idea.
    waitting ur answer.
    once again congratulation

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic