Shortcode Download Button Showing up as Code itself

Hello,

I am working on a new theme on my existing blog and found out that the shortcode for the download button is showing up as code itself. The code was working fine on the earlier theme showing the download button as intended, but not working on the new theme. There are hundreds of the following shortcodes across the site and I am just worried very much about the issue.

[s2If !current_user_can(access_s2member_level1)]
[mk_button dimension=“three” size=“large” bg_color="#6722d6 " text_color=“light” url=“http://www.graphicsfuel.com/membership/” target="_self" align=“left” id=“Buton ID” margin_top=“0” margin_bottom=“15” content=“Join Premium to Download”][/mk_button]
[/s2If]

[s2If current_user_can(access_s2member_level1)]
[mk_button dimension=“three” size=“large” bg_color="#ff6000 " text_color=“light” url=“http://www.graphicsfuel.com/?s2member_file_download=Cosmetic-Branding-Mockups.zip&s2member_skip_confirmation” target="_self" align=“left” id=“Buton ID” margin_top=“0” margin_bottom=“15” content=“Download Cosmetic Mockups”][/mk_button]
[/s2If]

You can check the issue on the dev site here: https://dev.graphicsfuel.com/2020/04/hand-drawn-vector-font-alphabets-and-extras/

What am I doing wrong and what am I need to fix? Please help.

Thanks much,
Rafi

Hi Rafi.

My guess is that s2Member active during the test… Whatever it was, it looks like you sorted it out now, because I see the pro-form here: https://dev.graphicsfuel.com/membership-checkout-monthly/

The site is looking great! Nice work! :slight_smile:

Hi Cristian,

Yes, the shortcode is working fine with pro-form, but unfortunately, the custom download buttons that I am using with S2member shotcodes are not working as I mentioned previously.

Please scroll down and see the download button code: https://dev.graphicsfuel.com/2020/04/hand-drawn-vector-font-alphabets-and-extras/

Still figuring out the issue.

Hi Rafi.

Do you mean this one?

[mk_button dimension=“three” size=“large” bg_color="#6722d6 " text_color=“light” url=“http://www.graphicsfuel.com/membership/” target="_self" align=“left” id=“Buton ID” margin_top=“0” margin_bottom=“15” content=" Join Premium to Download "][/mk_button]

That’s not an s2Member shortcode. Or which one do you mean? I don’t see an s2Member shortcode on the page.

Cristian,

This is the short code, but seems like the [mk_button] shortcode is not working within the s2member shortcode.

[s2If !current_user_can(access_s2member_level1)]
[mk_button dimension=“three” size=“large” bg_color="#6722d6 " text_color=“light” url=“http://www.graphicsfuel.com/membership/” target="_self" align=“left” id=“Buton ID” margin_top=“0” margin_bottom=“15” content=“Join Premium to Download”][/mk_button]
[/s2If]

Ah, I see. You meant the shortcode conditional.

Well, the conditional is working, because I was shown the mk_button while logged out. I don’t know why the mk_button shortcode is not working, though. I’ve used conditionals with working nested shortcodes.

If you put the mk_button shortcode outside the conditional, does it work correctly? If you take another shortcode that you know works fine, and nest it inside the conditional, does it stop working?

I see that the bg_color attribute’s value has an extra space before the closing quote. Not sure if that’s a reason for it to not work, but I have seen spaces affect shortcodes in the past.