• Resolved ARTEFACTOCO

    (@artefactoco)


    Hi Antonie, I was looking all the noon for an answer on the support but could find anything…

    I just want to add on the user page a text like this: “Below are all the predictions for (USER) Who is on the position (3) with (85) points.

    I want to add the current position of an user in the ranking and the points they have…

    Hope you could help with the code that should be added to the file “class-football-pool-user-page.php”.

    Thanks.

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

    (@antoineh)

    Hi,

    The plugin has two shortcodes that can display the info that you want. You can use these shortcodes in the do_shortcode() function of WordPress (if you supply the correct user ID), e.g.:

    $output .= sprintf( '<p>Who is ranked on position <span class="user-rank">%s</span> and has <span class="user-points">%s</span> points</p>'
    		, do_shortcode( "[fp-user-ranking user={$user_id}]" )
    		, do_shortcode( "[fp-user-score user={$user_id}]" )
    	);
    

    And because the page has a filter right after the intro text, there is no need to change the class file. You can add the above code to a plugin that hooks into the filter and then you don’t risk losing your change after an update of the plugin. You can download the plugin file here.

    Thread Starter ARTEFACTOCO

    (@artefactoco)

    Thats perfect! Just What I was needing!! Im only left with save predictions working with tabs ?? I did not to do it with jquery… Do you have some time to help me on this?

    Plugin Author AntoineH

    (@antoineh)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show Ranks Position and Points on User Page’ is closed to new replies.