<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Hooks for looping through the members - General Discussions				            </title>
            <link>https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/</link>
            <description>Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Tue, 12 May 2026 21:18:45 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Hooks for looping through the members</title>
                        <link>https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58299</link>
                        <pubDate>Thu, 16 Sep 2021 10:09:08 +0000</pubDate>
                        <description><![CDATA[Posted by: @mistergeko 
One more question if I may, now that it&#039;s solved how I can sort members the way I want, is there a code I could use to display members list somewhere else than on th...]]></description>
                        <content:encoded><![CDATA[<blockquote data-userid="37060" data-postid="58282" data-mention="mistergeko">
<div class="wpforo-post-quote-author"><strong> Posted by: @mistergeko </strong></div>
<p>One more question if I may, now that it's solved how I can sort members the way I want, is there a code I could use to display members list somewhere else than on the members page? For example, my idea is to display top 10 members in a widget area based on the number of answers to boost their motivation to answer questions in the forum. You don't have to show me the whole process of how to create a new widget, just how to output members list in a custom place. It can be simple just names, not the whole template as in members page with all the styling etc.</p>
</blockquote>
<p>We have such a feature in our to-do list, we'll do our best to add it in the upcoming 2.0  major version.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>Chris</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58299</guid>
                    </item>
				                    <item>
                        <title>RE: Hooks for looping through the members</title>
                        <link>https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58298</link>
                        <pubDate>Thu, 16 Sep 2021 10:08:33 +0000</pubDate>
                        <description><![CDATA[Okay thanks!]]></description>
                        <content:encoded><![CDATA[<p>Okay thanks!</p>
<p></p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>mistergeko</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58298</guid>
                    </item>
				                    <item>
                        <title>RE: Hooks for looping through the members</title>
                        <link>https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58282</link>
                        <pubDate>Thu, 16 Sep 2021 00:43:37 +0000</pubDate>
                        <description><![CDATA[Hi @chris,
Thank you very much for the code, I got it working the way I wanted. I was able to sort by the number of posts, rank or even number of answers, which is just awesome :)
One more...]]></description>
                        <content:encoded><![CDATA[<p>Hi @chris,</p>
<p>Thank you very much for the code, I got it working the way I wanted. I was able to sort by the number of posts, rank or even number of answers, which is just awesome :)</p>
<p>One more question if I may, now that it's solved how I can sort members the way I want, is there a code I could use to display members list somewhere else than on the members page? For example, my idea is to display top 10 members in a widget area based on the number of answers to boost their motivation to answer questions in the forum. You don't have to show me the whole process of how to create a new widget, just how to output members list in a custom place. It can be simple just names, not the whole template as in members page with all the styling etc.</p>
<p>Thanks a lot!</p>
<p></p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>mistergeko</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58282</guid>
                    </item>
				                    <item>
                        <title>RE: Hooks for looping through the members</title>
                        <link>https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58273</link>
                        <pubDate>Wed, 15 Sep 2021 12:44:46 +0000</pubDate>
                        <description><![CDATA[Hi @mistergeko,
Make the needed changes in this code and replace it with the old one in your active theme functions.php
add_filter(&#039;wpforo_after_init_current_object&#039;, function($current_obj...]]></description>
                        <content:encoded><![CDATA[<p>Hi @mistergeko,</p>
<p>Make the needed changes in this code and replace it with the old one in your active theme functions.php</p>
<pre class="c-mrkdwn__pre" style="margin: 4px 0px;padding: 8px;font-size: 12px;line-height: 1.50001;border: 1px solid var(--saf-0);border-radius: 4px;color: #1d1c1d;font-style: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-indent: 0px;text-transform: none" contenteditable="false" data-stringify-type="pre">add_filter('wpforo_after_init_current_object', function($current_object){
    if( $current_object === 'members' ){
       $args = array(
          'offset'    =&gt; ( $current_object - 1 ) * $current_object,
          'row_count' =&gt; $current_object,
          'orderby'   =&gt; 'posts',
          'order'     =&gt; 'DESC',
          'status'    =&gt; array( 'active' ),
          'groupids'  =&gt; WPF()-&gt;usergroup-&gt;get_visible_usergroup_ids()
       );
       $current_object = WPF()-&gt;member-&gt;get_members($args, $current_object);
    }
    
    return $current_object;
});</pre>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>Chris</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58273</guid>
                    </item>
				                    <item>
                        <title>Hooks for looping through the members</title>
                        <link>https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58161</link>
                        <pubDate>Tue, 14 Sep 2021 15:32:47 +0000</pubDate>
                        <description><![CDATA[Hi I&#039;m new to wpForo forums.
I am curious whether you have some hooks or documentation that can help me to loop through the members in the database and sort them based on their properties s...]]></description>
                        <content:encoded><![CDATA[<p>Hi I'm new to wpForo forums.</p>
<p>I am curious whether you have some hooks or documentation that can help me to loop through the members in the database and sort them based on their properties such as number of posts or rank etc?</p>
<p>Any help to steer me in the right direction will be highly appreciated!</p>
<p>Thanks</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>mistergeko</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/hooks-for-looping-through-the-members/#post-58161</guid>
                    </item>
							        </channel>
        </rss>
		