• Am currently using the latest version of WP Members.

    Should the [wpmem_logged_in] shortcode work when shortcodes are contained within.
    i.e.
    [wpmem_logged_in]
    [gravityform id=”1″ title=”true” description=”true” ]
    [/wpmem_logged_in]

    I’m having to cheat and use another plugin at the moment. (Ideally I’d like to stick to just WP Members but am using Restrict Content by Pippa Williamson

    One problem I’m trying to avoid is I have a section that displays a users avatar and some login details. When a user isn’t logged in, the section is still drawn, but empty and leaves a blank gap.
    I did search through the forum for a similar issue and couldn’t find any reference to it. I am a new user to WP Members so it might have been a recent update that has broken something or it’s not supported as of yet.

    As well as supporting non-WP Member shortcodes (like my gravityform example), I would also like to include WP Member shortcodes such as:

    [wpmem_logged_in]
    [wpmem_avatar]
    [/wpmem_logged_in]

    [wpmem_logged_out]
    [wpmem_form login] <— wouldn’t actually use that here but just an example
    [/wpmem_logged_out]

    The only confusing thing is that the following does work:

    [wpmem_logged_in][wpmem_form user_edit][/wpmem_logged_in]

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

    (@cbutlerjr)

    Should the [wpmem_logged_in] shortcode work when shortcodes are contained within.

    Yes – I don’t see a reason why they wouldn’t. I’m not sure why you’d have an issue with this with any other shortcodes, but I will look into it.

    When a user isn’t logged in, the section is still drawn, but empty and leaves a blank gap.

    The extra space is likely not related to the plugin or the shortcode, but more based on the parsing of line breaks in your content when declaring the shortcode.

    You might want to try removing the linebreaks in the content to see if that improves the result. WP is not supposed to execute wpautop() on shortcodes, but that doesn’t mean that will always be the case. It highly depends on theme and other plugins.

    To give some specific color to this, the following could very likely result in some extra <p> tags being generated:

    [wpmem_logged_in]
    [wpmem_avatar]
    [/wpmem_logged_in]

    whereas, the following should not:

    [wpmem_logged_in][wpmem_avatar][/wpmem_logged_in]

    Hope that helps.

    Thread Starter shinerweb

    (@shinerweb)

    hmmm. I’ll have to do a bit more digging. I’d put in the extra line breaks just for ease of displaying them in the ticket. (I have it without in the actual page code).
    I did do a little more investigating and I could get all the WPMEM shortcodes to work (as expected) but none of the shortcodes with any other plugins would work.
    This site is using the Aviva theme which is new to me so I’m learning any funnies that come with that theme ‘on the fly’. I’ll have a deeper look into the code and have a play on my development server.
    It’s more likely my end as I’d have expected more people to yell.
    Cheers for the update and I’ll be in touch if I can find any useful info.
    Regards
    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Execution of Shortcodes within WP-Member Shortcodes’ is closed to new replies.