Version of WordPress: 3.6
Theme: Energy
Recently Installed Plugins: None
Customized something recently: No
Direct Link to Page with Issue: http://membervalue.calicomarketing.com/define/
Details about testing cause
1) Button on client’s server worked fine (no errors) until they updated to WordPress 3.6.
2) To test the cause of the issue I opened the test server. At the time I had not yet updated any plugins or WordPress version for 2 months.
– 1st, I updated the plugins. Button worked fine.
– 2nd, I updated to WordPress 3.6. Button stopped working.
I concluded it was likely the WordPress 3.6 update. I was wondering if anyone had a fix for this issue.
Thank you.
Where does the button shortcode originate? Is it a plugin?
The button shortcode came with the template.
It works with PrettyPhoto.
Shortcode.php
function energy_buttons( $atts, $content = null ) {
extract(shortcode_atts(array(
'link' => '#',
'size' => 'medium',
'target' => '_self',
'lightbox' => false,
'color' => 'white',
'icon' => '',
'style' => ''
), $atts));
if($lightbox == true) {
$return = "prettyPhoto ";
}
else{
$return = " ";
}
if($icon == '') {
$return2 = "";
}
else{
$return2 = "<i class='icon-".$icon."'></i>";
}
$out = "<a href=\"" .$link. "\" target=\"" .$target. "\" class=\"".$return."button ".$color." ".$size." ".$style."\" rel=\"slides[buttonlightbox]\">". $return2 . "". do_shortcode($content). "</a>";
return $out;
}
Do you have the same problem using twentytwelve or twentythirteen theme?
Solved for my issue:
My issued was WordPress 3.6 didn’t like the shortcode’s tag lightbox=”false” or lightbox=”true”. Once I removed it, the button worked again without errors.
Not Working Button:
[button link="http://www.google.com" size="medium" target="_blank" color="green" lightbox="false"]You Button Text[/button]
Working Button:
[button link="http://www.google.com" size="medium" target="_blank" color="green"]You Button Text[/button]