Simple Membership Plugin › Forums › Simple Membership Plugin › Add membership_level_name into a URL, shortcode double quote problem
Tagged: double quote, link, shortcode
- This topic has 5 replies, 3 voices, and was last updated 6 years, 3 months ago by
Icarus.
-
AuthorPosts
-
December 29, 2019 at 7:32 pm #19537
Icarus
ParticipantHello,
Thanks for this great plugin.I’m trying to create a button with a URL containing the membership_level_name.
I have no problem to create the URL :
https://sitename.com/[swpm_show_member_info column="membership_level_name"]But when i put it into a link :
<a>Link text</a>, WordPress doesn’t like it, and consider the first ” as the end of the link… (e.g. the link is now only considered as :https://sitename.com/[swpm_show_member_info column=).As anyone of you the solution to create a button that redirect to :
https://sitename.com/name_of_the_level?Thanks
IcarusDecember 30, 2019 at 9:17 pm #19539mbrsolution
ModeratorHi,
I’m trying to create a button with a URL containing the membership_level_name.
Can you provide more information regarding what you are trying to achieve?
Thank you
December 30, 2019 at 11:12 pm #19547Icarus
ParticipantThanks for your answer.
I’m trying to create a button on the connection page, that let people go back to the album they created before.
Here is the html code of the button :
<div class="button"><a href="https://sitename.com/[swpm_ show_member_info column=%22membership_ level_name%22]">Accéder à mon album </a></div>.Am I clear enough ?
Thank you
December 30, 2019 at 11:13 pm #19548Icarus
ParticipantSorry, the code i’m trying to use is this one :
<div class="button"><a href="https://sitename.com/[swpm_ show_member_info column="membership_ level_name"]">Accéder à mon album </a></div>December 31, 2019 at 12:00 am #19549admin
KeymasterI don’t know the full context (in terms of where this code is being executed and how) so my answer could be wrong. But below is an example of how you might try it. Basiclaly use single quote in the shortcode (instead of double quotes):
https://sitename.com/%5Bswpm_show_member_info column=’membership_level_name’]
I am not sure if WordPress will let you execute that shortcode inside the a tag (for security reason it maybe execute the shortcode. Probably a better option is to create a custom shortcode yourself that outputs the URL the way you want to.
December 31, 2019 at 12:06 am #19550Icarus
ParticipantI am not sure if WordPress will let you execute that shortcode inside the a tag
It doesn’t. I’ve already tried many options.
Ok. M going to try to create my own shortcode (never did that…).
Thank you.
Icarus -
AuthorPosts
- You must be logged in to reply to this topic.