latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

wp_list_pages is not filtered

Home Forums Community Forum wp_list_pages is not filtered

This topic contains 0 replies, has 1 voice. Last updated by  Colin Hahn 3 years, 1 month ago.

Topic Author Topic
Posted: Friday Nov 22nd, 2013 at 3:06 pm #61298

I’m trying to filter a sidebar generated by wp_list_pages so that users can only see what they have access rights to. However, the code below is having no filtering effect: everyone can see everything, regardless of their user permissions (or even if they are logged out). I’m sure I’m overlooking something simple; can someone help me figure out how to filter this sidebar?



<section id="content" class="center">
<h2 class="pagetitle">Sidebar Test</h2>
&lt;?php
attach_s2member_query_filters();

echo &#039;
<div class="coursewidget modulewidget sidebarwidget">
<h3 class="coursewidgettitle">My Courses</h3>
';

$modargs = array(
'post_type' =&gt; 'tu_level',
'title_li' =&gt; '',
);
echo '<ul class="courselist">';
wp_list_pages( $modargs ); 
echo '</ul>';

echo '</div>';

detach_s2member_query_filters();
?&gt;
</section>

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.