• Resolved poelie

    (@poelie)


    after publishing my league tables on my wp-site i’m getting the following error messages on the front-end:

    Warning: Missing argument 3 for sportspress_hide_adjacent_post_links() in /home/bctzwa/public_html/wp-content/plugins/sportspress/includes/sp-template-hooks.php on line 360

    Warning: Missing argument 4 for sportspress_hide_adjacent_post_links() in /home/bctzwa/public_html/wp-content/plugins/sportspress/includes/sp-template-hooks.php on line 360

    Warning: First parameter must either be an object or the name of an existing class in /home/bctzwa/public_html/wp-content/plugins/sportspress/includes/sp-template-hooks.php on line 361

    Any thoughts whats causing this?

    Tnx in advance

    https://wordpress.org/plugins/sportspress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ThemeBoy

    (@themeboy)

    Hi @poelie,

    It looks like your theme may be using previous_post_link() and next_post_link() with 2 arguments. I’ll look into adding a fallback when arguments are not supplied to improve compatibility with other themes.

    For now, try replacing the sportspress_hide_adjacent_post_links function in sportspress/includes/sp-template-hooks.php with this:

    function sportspress_hide_adjacent_post_links( $output = null, $format = null, $link = null, $post = null ) {
    	if ( is_object( $post ) && property_exists( $post, 'post_type' ) && in_array( $post->post_type, sp_post_types() ) )
    		return false;
    	return $output;
    }
    Thread Starter poelie

    (@poelie)

    Tnx for the fast reply. If I replace the code I get the following error:

    Parse error: syntax error, unexpected ‘;’ in /home/bctzwa/public_html/wp-content/plugins/sportspress/includes/sp-template-hooks.php on line 362

    line 362 is:
    if ( is_object( $post ) && property_exists( $post, ' post_type' ) && in_array( $post-> post_type, sp_post_types() ) )

    The error message appears when I go to any page on the website

    Thread Starter poelie

    (@poelie)

    Sorry ThemeBoy,

    I was a little to hasty…
    I copied the code from the email I received and that didn’t work. But after I copied the code from the support site it worked like a charm!

    Tnx for all your help and keep up the good work!

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

The topic ‘Error on league tables’ is closed to new replies.