Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter brandyqk

    (@brandyqk)

    Version of WordPress: 3.6
    Theme: Energy
    Recently Installed Plugins: None
    Customized something recently: No
    Direct Link to Page with Issue: https://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?

    Thread Starter brandyqk

    (@brandyqk)

    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?

    Thread Starter brandyqk

    (@brandyqk)

    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="https://www.google.com" size="medium" target="_blank" color="green" lightbox="false"]You Button Text[/button]

    Working Button:
    [button link="https://www.google.com" size="medium" target="_blank" color="green"]You Button Text[/button]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP 3.6 – Affects my button shortcode & lightbox’ is closed to new replies.