Support » Plugin: WP-Members Membership Plugin » wp-members shortcode in page makes it always visible

  • Resolved ireddy

    (@ireddy)


    Pages with [wp-members …] shortcodes in them are always visible to everyone no matter what I do.

    A) With wp-members set to block pages by default, all pages require login and can be toggled with the exception of two that have [wp-members …] shortcodes in them. Those two are visible no matter how I set “Unblock this page”.

    B) With wp-members set to show pages by default, all pages are visible including the two that have [wp-members …] shortcodes in them. Those two are visible no matter how I set “Block this page”.

    As a test I tried adding [wp-members field=”first_name”] to a page that was working fine, and it immediately adopted the behavior of being always visible to all.

    Anyone have any idea where to look?

    -Ian

    http://wordpress.org/extend/plugins/wp-members/

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

    (@cbutlerjr)

    Yes, that is a current downside to the shortcodes at present. I’ve stated it somewhere in the User Guide that shortcodes cannot be used on blocked content.

    Now, that being said, the reason is that the shortcodes grew in the plugin at a faster rate than the wpmem_securify function, which is the function that handles all of the possibilities of whether or not to block content and whether we are registering/logging in a user, etc. Currently, wpmem_securify checks for the presence of a shortcode and if one exists, it gets out of the function.

    The reason for that is that back when there were only three page shortcodes (members-area, register, and login), these functions had nothing to do with blocking the page or not, so it was ok to leave the securify function. But now we’ve grown out a lot more possibilities, so it is probably time to evaluate how we can improve this so that shortcodes (since there are many more now) can be used anywhere.

    So, the short answer is “Yes, we know that; but we’ll evaluate improvements in this area for a future release (soon).”

    Thread Starter ireddy

    (@ireddy)

    Got it, thanks.

    It seems like any shortcode in the page content results in the page being visible. For example, I have a shortcode that displays a calendar and the calendar is always displayed.

    First of all, is that true that all shortcodes, not just WP-Member shortcodes are affected this way?

    Secondly, any workarounds for non WP-member short codes?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp-members shortcode in page makes it always visible’ is closed to new replies.