• Dear Antonie

    I have question about Prediction Page.
    In this page users can fill their prediction and save them. After the match these matches already is available and users can see their predicts. I want to hide these close matches and user can see open matches because all matches predictions are available in player predictions page.
    Is it any solution for this request?

    Best regards,

    https://wordpress.org/plugins/football-pool/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author AntoineH

    (@antoineh)

    Hi,

    There are two options:

    1. Closed matches on the input form get a CSS class “closed”. You can use this to hide them (tr.match.closed { display:none; }).
    2. The PHP code that displays the matches has a hook that allows you to change the data set of matches.

    The first option is very simple, but it still outputs the closed matches to the user (only hidden). The second option only outputs the matches that are relevant, but requires some PHP knowledge to hook into the plugin’s code (the help page of my plugin has some examples on how to use hooks).

    Thread Starter soroush566

    (@soroush566)

    Dear Antonie

    Thanks for your reply. As you said I do the first option and its OK, but I still see the match date row. What should I do for those rows?
    If with this option I can’t hide them, could you please let me know the PHP code as second option.

    Best regards

    Plugin Author AntoineH

    (@antoineh)

    I was wrong, there is only one hook that can be used to filter the matches on that page, but unfortunately that will also filter the matches in other parts of the plugin. So this can’t be used.

    In a couple of days I will release a minor update for the plugin and I will include an extra hook in that version that can be used.

    I already made an extension plugin that you can use with this new version (download it here). You can safely activate this plugin on your install, but it will do nothing until you update to version 2.4.3. If you don’t want to wait for this new version, then make the following change to the plugin:

    1. Open classes/class-football-pool-matches.php
    2. Add the following line before line 489:
    $matches = apply_filters( 'footballpool_predictionform_matches_filter', $matches );

    Thread Starter soroush566

    (@soroush566)

    Thanks for your reply.
    I added that filter as your instruction bur unfortunately it doesn’t work. Maybe I had a mistake. So I’m waiting for new version.

    Plugin Author AntoineH

    (@antoineh)

    Did you also activate the extra plugin?

    Thread Starter soroush566

    (@soroush566)

    Yes
    My extra plugins are:
    – Clean Login
    – Javascript chat for wordpress
    – Page Restrict
    – Visual Form Builder Pro
    – WP-Mail-SMTP
    – wp-jalali

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Close Matches’ is closed to new replies.