Title: lbodden's Replies | WordPress.org

---

# lbodden

  [  ](https://wordpress.org/support/users/lbodden/)

 *   [Profile](https://wordpress.org/support/users/lbodden/)
 *   [Topics Started](https://wordpress.org/support/users/lbodden/topics/)
 *   [Replies Created](https://wordpress.org/support/users/lbodden/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/lbodden/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/lbodden/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/lbodden/engagements/)
 *   [Favorites](https://wordpress.org/support/users/lbodden/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] s2member business directory plugin](https://wordpress.org/support/topic/s2member-business-directory-plugin/)
 *  Thread Starter [lbodden](https://wordpress.org/support/users/lbodden/)
 * (@lbodden)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/s2member-business-directory-plugin/#post-5224925)
 * I actually got it to work, since the URIs are setup to be the same as the terms
   slugs i checked it to that and now search is properly being filtered. Here is
   the code in case anyone else comes across the same problem…
 *     ```
       <div class="listings">
               <?php
                   while ( have_posts() ) {
                               the_post();
                               $this_post_id = get_the_ID();
                               $terms = wp_get_post_terms( $this_post_id, 'wpbdp_category' );
                               foreach ($terms as $thisterm) {
                                   //echo $thisterm->term_id;
                                   if (!is_permitted_by_s2member ($thisterm->slug, "uri")){
                                       continue 2;
                                   }
   
                               }
                               echo wpbdp_render_listing(null, 'excerpt');
                               /* added to keep list of what posts are on THIS page for google map */
                               $post_ids[] = get_the_ID();
                   } // end while
               ?>
   
           <div class="wpbdp-pagination">
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] s2member business directory plugin](https://wordpress.org/support/topic/s2member-business-directory-plugin/)
 *  Thread Starter [lbodden](https://wordpress.org/support/users/lbodden/)
 * (@lbodden)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/s2member-business-directory-plugin/#post-5224921)
 * thats unfortunately what i’ve been banging my head against to try and get to 
   work. i can get the custom post taxonomy terms but when checking against that
   function it doesn’t work. i have the exact matching IDs in the category restriction
   section of s2member.
 *     ```
       $this_post_id = get_the_ID();
       $terms = wp_get_post_terms( $this_post_id, 'wpbdp_category' );
              foreach ($terms as $thisterm) {
                        if (!is_permitted_by_s2member ($thisterm->term_id, "category")){
                                       continue 2;
                         }
   
              }
       ```
   
 * btw thank you for you patience and help…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] s2member business directory plugin](https://wordpress.org/support/topic/s2member-business-directory-plugin/)
 *  Thread Starter [lbodden](https://wordpress.org/support/users/lbodden/)
 * (@lbodden)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/s2member-business-directory-plugin/#post-5224906)
 * I do have alternative view protection on. Keep in mind the search being used,
   as I stated above, is not wordpress search functionality it is a built in search
   with business directory plugin
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] s2member business directory plugin](https://wordpress.org/support/topic/s2member-business-directory-plugin/)
 *  Thread Starter [lbodden](https://wordpress.org/support/users/lbodden/)
 * (@lbodden)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/s2member-business-directory-plugin/#post-5224900)
 * I also have all of that enabled but I need to restrict custom taxonomies to certain
   levels. I have already enabled URI restrictions which is great and works 100%
   when you are navigating around with links. But, when you search the URI restrictions
   are useless. I realize editing the core files is bad practice so i have moved
   to try and edit the template file displaying the posts. I edited this to no luck
   because as I have said before the categories are a custom taxonomy…
 *     ```
       <div class="listings">
               <?php
                   while ( have_posts() ) {
                               the_post();
                               $this_post_id = get_the_ID();
                               $category = get_the_category( $this_post_id );
   
                               if(!is_permitted_by_s2member ($category->cat_ID, "category"))
                                   continue;
   
                               echo wpbdp_render_listing(null, 'excerpt');
                               /* added to keep list of what posts are on THIS page for google map */
                               $post_ids[] = get_the_ID();
                   } // end while
               ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] s2member business directory plugin](https://wordpress.org/support/topic/s2member-business-directory-plugin/)
 *  Thread Starter [lbodden](https://wordpress.org/support/users/lbodden/)
 * (@lbodden)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/s2member-business-directory-plugin/#post-5224894)
 * Thank you for your reply, I have realized that business directory makes the listings
   as a custom post type. This being said the categories created are custom taxonomies
   and when placing the category ids into
 * > Dashboard -› s2Member® -› Restriction Options -› Category Access Restrictions
 *  there is no change in protection. I read [here](http://www.s2member.com/forums/topic/protect-custom-taxonomies/)
   that custom taxonomies are not supported. However, that was an old post. Is there
   any way to get custom taxonomies working for category restrictions other than
   tags?

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