Button links through to homepage only
-
Hi there,
Really an amazing plugin! Really extensive and key to look at for improvement on many WP sites I am sure. I am still a little new in WP and development but would really love to contribute more to this at some point!
OK now the glitch that I am experiencing – the [button] shortcode only links through to the homepage even if I set the URL – Eg. https://dev2.striata.com/about-striata/career-application/ (the site is in maintenance mode)
I.E [button url=”https://dev2.striata.com/about-striata/career-application/” style=”flat” radius=”0″]Button text[/button] … clicking on Button text, it goes to https://dev2.striata.com.
Thank you in advance
-
I had that problem too, but I found out the problem (for me anyway)..
try looking in the “html” mode, see if you have a space that is written as?
directly next to the shortcode.(for me) I had to remove the
in html mode and then everything functioned as normal.(can’t see the
when you are in the normal visual editor, so you might not know it’s there)Thank you very much happyches. Much appreciated the feedback ??
It wasn’t really a ‘ ‘ that I found but when rebuilding the shortcode with individual attributes it worked – I copied the 2 shortcodes to Sublime Text editor to compare and find what it could be but found no differences other than an unknown character set space: wide=”yes”HEREcenter=”yes” and wide=”yes”HEREcenter=”yes”
Though now, once I delete the first ‘broken’ instance – the second one which worked does the same as initially. ??
Any idea why?
One of my button shortcodes (that works) is:
[gn_button url="https://mydomain.com/health-blog/" style="soft" background="#42a22a" size="5" wide="yes" center="yes" icon="icon: apple"]Just Health Posts[/gn_button]
(note, I use gn_ compatibility mode, so just pretend gn_ isn’t there)
The space that you refer to in-between “yes” and “center”.. is in my code.. and that works fine.. and is supposed to be there..
Do you mean that something else is in that space? that shouldn’t be? (like
 
instead of a space?)If so, go to Shortcodes > Settings and try unchecking “enabled” next to
Custom formatting (then recreate the shortcode)(I don’t know exactly what it does/how it works, but it does something with the wautopop, which is something to do with the things that wordpress automatically changes in formatting like when wordpress automatically adds
 
)Thank you once again happyches … I have inserted the following which works:
<!--[button url="https://dev2.striata.com/about-striata/career-application/" style="flat" background="#fd8204" size="4" wide="yes"?center="yes" radius="0"?icon="icon: clipboard"]Apply for this position ...[/button] -->[button url="https://dev2.striata.com/about-striata/career-application/" style="flat" background="#fd8204" size="4" wide="yes"?center="yes" radius="0"?icon="icon: clipboard"]Apply for this position ...[/button]
As soon as I remove the first instance which I commented out – the link goes to the homepage, bleh!
Yeh, agreed that the space should be there. Though in Sublime text when editing and selecting all spaces that isn’t selected strangely. I am thinking it is an ASCII space character.
I am currently afraid of changing the any of the SU settings (custom formatting and prefix) as we already have hundreds of pages with SU shortcodes already.
Is there a quick/easier way to update ALL shortcodes with a prefix? And also, what implications could this have on styling, etc?
I did it (unchecked custom formatting) on one of my sites tonight (the site that is basically built with shortcodes ultimate, there is not a single post or page that doesn’t use at least 10-50 shortcodes on it), and it didn’t seem to break anything if that helps ??
(I have broken things but it’s unrelated to the change I made, and more to do with the latest version changes)
I don’t think it’s a good idea to change ALL shortcodes with a prefix at once, cos the plugin wouldn’t know which is part of shortcodes ultimate and which is part of another plugin or theme, so it would be a dangerous button to press.. I wouldn’t press it lol..
How many shortcodes have you got? I have thousands so I would never change my prefix (but I started with compatibility mode so all of mine have the gn_ prefix across all of my sites)
If you haven’t gone too far in, then you could change to su_ prefix (the new standard) by going to shortcodes > settings and adding it to the prefix section.. because maybe it is conflicting with a setting in your theme (your theme might already have something for [button] for example)
But I think that would mean having to recreate all the shortcodes that you’ve already created site-wide, manually…
(you can do a search for ‘[‘ in posts and pages to find all your shortcodes.. that will still take days if you have hundreds of posts though.. a nightmare if you’ve been using this plugin for a while)Other things that I’m thinking in your case..
* Maybe it’s something to do with the fact that your site is in maintenance mode.. switch it off and test..?
* Try putting [raw] tags around your button code (assuming it’s just the buttons that aren’t working).. so in your case it would be:
[raw][button url=”https://dev2.striata.com/about-striata/career-application/” style=”flat” background=”#fd8204″ size=”4″ wide=”yes” center=”yes” radius=”0″ icon=”icon: clipboard”]Apply for this position …[/button][/raw]
* Me, I would definitely be trying the unchecking of the Custom formatting.. (and if you are concerned about changes, do a site-clone/backup first)..
I only tried it myself because of a post I saw from the developer to someone else .. I can’t find it again cos it’s almost 3am (Australia) and I have to work tomorrow so I don’t have time to look for it, but the developer suggested it and explained that it just removed something to do with wautopop.
(I haven’t noticed anything breaking due to unchecking of custom formatting and I had the same concerns/fears as you)I couldn’t sleep until I found the link.. I still couldn’t find the dev post reply but I found his knowledgebase post about what the custom formatting does:
Similar problem here using the default settings.
What’s happening is that the links are getting changed somehow to point back to the home page even though the underlying button tags and the actual HTML remain unchanged.
On my site, the change takes place within about five minutes after the button is created. When I first hover over a new button, the displayed link in the browser is correct. Then a few minutes later, a hover will show it’s pointing back to my home page even though the button code itself remains unchanged and correct.
Any ideas?
Here’s my tag:
[su_button url=”https://angelscrapbooking.com/store/” style=”default” background=”#21610B” color=”#FFFFFF” size=”3″ wide=”no” center=”no” radius=”auto” icon_color=”#FFFFFF” text_shadow=”none”]Go to Store[/su_button]
This will end up pointing back to my home page of https://angelscrapbooking.com
I believe I can duplicate the “trigger” for the fault.
When I first create a button with a link, it works normally.
But when I create a second button with a link, upon refreshing the page, the first button now points to my site’s home page although its code hasn’t change.
Then if I create a third button, the first, second, and the third button will then point to the home page although their code and underlying links remain the same.
All other Shortcodes Ultimate features appear to be unaffected and work normally.
See the links below to my screenshots.
I’ve also tried turning off all other plugins that use shortcodes including Jetpack, Form 7, and WP eStore, but the problem persists.
Any ideas?
Thanks!
___________
[su_pullquote align="left"]Specializing in Handmade Vintage Scrapbooks![/su_pullquote]Thank you for visiting Angel's Scrapbooking, your source for handmade scrapbooks, vintage scrapbooks, and one-of-a-kind keepsakes. Please support home-based crafters by visiting our store! [su_spacer size="20"] [su_button url="https://www.remarpro.com" target="self" style="default" background="#2D89EF" color="#FFFFFF" size="3" wide="no" center="no" radius="auto" icon_color="#FFFFFF" text_shadow="none"]Test Button#1 Links to www.remarpro.com[/su_button] [su_spacer size="20"] [su_button url="https://www.www.remarpro.com" target="self" style="default" background="#2D89EF" color="#FFFFFF" size="3" wide="no" center="no" radius="auto" icon_color="#FFFFFF" text_shadow="none"]Test Button #2 Links to www.remarpro.com[/su_button] [su_spacer size="20"] [su_button url="https://www.www.remarpro.com" target="self" style="default" background="#2D89EF" color="#FFFFFF" size="3" wide="no" center="no" radius="auto" icon_color="#FFFFFF" text_shadow="none"]Test Button #3 Links to www.remarpro.com[/su_button]
- The topic ‘Button links through to homepage only’ is closed to new replies.