Hiding Docs Based upon s2Membership
-
Firstly, I cloned the source into my plugins folder, so the folder name for the plugin is
/wedocs-plugin
In the /templates folder, I have edited a file called
shortcode.php
. Immediately after<?php foreach ($docs as $main_doc) : ?>
i’ve placed the following condition to prevent the list item from being displayed if the user is not authenticated with s2Member:<?php if (!is_permitted_by_s2member ( $main_doc['doc']->ID )) : ?>
<?php else : ?>
[ remainder of list item code here ]
<?php endif; ?>
QUESTION:
Now that I’ve hidden specific documents from the wedocs front page, I’m needing to also eliminate them from the docs-sidebar.php and single-docs.php files, however, both of those simply call the wp_list_pages() function and I haven’t figured out how to omit restricted pages from the function.
Any ideas?
- The topic ‘Hiding Docs Based upon s2Membership’ is closed to new replies.