Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember -is there a limit on number of protect Nested shortcodes in text widget
- This topic has 4 replies, 2 voices, and was last updated 9 years, 9 months ago by
admin.
-
AuthorPosts
-
June 10, 2015 at 2:28 am #12757
credos
MemberI have been using a series of nested shortcodes in a text widget to display a button/link to logged in members that takes them back to their respective members area page. This is basically the same page as specified in Membership level redirect after login page for each level.
The shortcode is meant to only show the link (actually a button using the theme’s shortcodee) if the member is from the relevant member level.
This seemed to work fine up until a certain number of shortcodes had been put into the widget, for additional levels they no longer show up.
I was wondering if their is a predefined limit on the number of these nested shortcodes that can be placed in a text widget? I tried creating a second widget to contain the additional levels but that doesnt seem to work either.
I tried editing the line:
‘add_filter(‘the_content’, ‘do_shortcode’, 11);’
to
‘add_filter(‘the_content’, ‘do_shortcode’);’
as shown in:
eMember – Shortcode Inside Another Shortcode (Shortcode Nesting) Not Filtering
but it did not fix the issue.
The shortcodes are in the form (just giving an example of one level, there needs to be around 9 or 10 levels catered for in this arrangement)
[emember_protected for=7 do_not_show_restricted_msg=1][button
link=”http://domain.com/members-area/”
color=”green”]Members’ Area[/button][/emember_protected]
Any light you can shed on how to correct this would be great.
June 10, 2015 at 11:17 pm #70403admin
KeymastereMember doesn’t impose any limit on this. If there is a limit it would be coming from the standard shortcode handling of WordPress.
What you have there should work fine though. Is that not working either? What happens if you put that same code in a WordPress page?
June 11, 2015 at 8:45 pm #70404credos
MemberNot sure about the WordPress page will check. Thx.
June 18, 2015 at 11:11 pm #70405credos
MemberIs there a single URL I can send the user to (instead of using the shortcode button combination) that will redirect the user back to the “redirect after login page” specified for their membership level in eMember settings?
So I’d only need to specify one link, not a series of nested shortcodes.
Or an eMember shortcode, I think we are going to run into limits trying to add all these nested eMemeber/theme shortcodes?
June 19, 2015 at 2:37 am #70406admin
KeymasterPlease explain your end goal so I understand what you are trying to do. Give examples if possible.
-
AuthorPosts
- You must be logged in to reply to this topic.