Title: Predictions
Last modified: June 14, 2024

---

# Predictions

 *  [marc2107](https://wordpress.org/support/users/marc2107/)
 * (@marc2107)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/)
 * Is it possible to ad a dropdown menu of the different pools on the match prediction
   page?
 * We have three pools and all players from all these three pools are shown in the
   same list.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpredictions-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/#post-17826518)
 * Is it possible? Yes, but you’ll need to do some coding. There is a filter that
   can be used to limit the users that are shown. [This example](https://www.dropbox.com/scl/fi/1ga6qrka50z6im5srei85/football-pool-hide-users-without-prediction.php?rlkey=828cs6v71ti91grnbooxab0tl&dl=0)
   uses the filter to remove inactive players, but you can also change it to filter
   out users based on a selected league ID.
 * Then all you need is a dropdown. Every page in the plugin also has a filter to
   add content. A (somewhat changed) example from the help page (untested):
 *     ```wp-block-code
        add_filter( 'footballpool_pages_html', 'add_dropdown', null, 2 );function add_dropdown( $content, $id ) {	$dropdown = '';	if ( $id === Football_Pool_Utils::get_fp_option( 'page_id_statistics', 0, 'int' ) ) {		$dropdown = '<select name="league">			<option value="1">test 1</option>			<option value="2">test 2</option>			</select><br>';	}		return "{$dropdown}{$content}";}
       ```
   
 * You can make it a bit more complex by retrieving the leagues dynamically, but
   if they won’t change, then that might be overkill.
 * Another option would be to just add 3 links to the same page but with the league
   ID in the querystring, and then use that value from the URL in your code to filter
   out the users.
 * p.s. I noticed on your website that your teams are not all labelled as ‘real’
   teams. You can see this, when you go to the [groups page](https://toag.nl/index.php/tournament/groups/).
 *  Thread Starter [marc2107](https://wordpress.org/support/users/marc2107/)
 * (@marc2107)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/#post-17826873)
 * Hi! Unbelievable the service you provide! Such quick responses!! However, I think
   you are overestimating my skills. So I think I should go with the 3 links. Can
   you help me along with the strings? I tried adding “?league=2&_submit=ga” but
   that doesn’t do the job….
   If you don’t want to help anymore I can understand,
   no problem!!!
 * Greetings,
   Marc
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/#post-17826963)
 * I think I have most of what you want already in another old extension. If I can
   find some time this week(end) I will try to combine the code snippets in one 
   extension plugin.
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/#post-17827552)
 * I created [something](https://www.dropbox.com/scl/fi/6gs0d9kkpshv28drb60pr/football-pool-filter-stats-by-league.php?rlkey=s52na3zdxqzej2f6ehcnwd3wq&dl=0).
   Took a bit longer than expected because I realized that I also had to filter 
   the chart on that page and also the bonus question view. Hope this is useful.
 * You should use links that are formatted like this: ?view=matchpredictions&match
   =1&league=2
 *  Thread Starter [marc2107](https://wordpress.org/support/users/marc2107/)
 * (@marc2107)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/#post-17832963)
 * Hi Antoine, although I am very sure this is perfectly working, I have no idea
   how to implement this on my site. So I’ll just leave it like it is, or switch
   off the posibility to see everyones predictions. 
   Thanks for all your effort!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Predictions’ is closed to new replies.

 * ![](https://ps.w.org/football-pool/assets/icon-256x256.png?rev=983880)
 * [Football Pool](https://wordpress.org/plugins/football-pool/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/football-pool/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/football-pool/)
 * [Active Topics](https://wordpress.org/support/plugin/football-pool/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/football-pool/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/football-pool/reviews/)

## Tags

 * [predictions](https://wordpress.org/support/topic-tag/predictions/)

 * 5 replies
 * 2 participants
 * Last reply from: [marc2107](https://wordpress.org/support/users/marc2107/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/predictions-2/#post-17832963)
 * Status: not a support question