• Resolved qaresther

    (@qaresther)


    Hi,
    this might be a strange problem :

    I started using woody snippet free, and created this shortcode :

    <?php
    $html='[fusion_builder_column type="1_1" layout="1_1" center_content="no" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="cta-bloc-intext" id="" background_color="#ffffff" background_image_id="" background_position="right bottom" background_repeat="no-repeat" background_blend_mode="none" first="true" last="true" margin_bottom="30px" padding_top="30px" padding_right="30px" padding_bottom="30px" padding_left="30px" hover_type="none" border_position="all" link=""][fusion_text hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="cta-bloc-intext-title" id=""]'.$title.'
    [/fusion_text][fusion_text hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="cta-bloc-intext-text" id=""]'.$content.'[/fusion_text][/fusion_builder_column]';
    
    echo do_shortcode($html);
    ?>

    Basically its use was to call pre-stylized elements from the theme I’m using and populating it with contents, it needed do_shortcode() to work (if not it’ll just paste the theme elements as plain text).
    This worked fine until I bought the premium version, and gave it a custom name. So now when I call so the shortcode created a fatal error.

    (it’s in french but it’s pretty self explanatory) :

    Une erreur de type E_PARSE a été causée dans la ligne 1 du fichier /var/www/wordpress/wp-content/plugins/woody-ad-snippets-premium/includes/shortcodes/shortcode-custom.php(114) : eval()’d code. Message d’erreur : syntax error, unexpected ‘margin’ (T_STRING)

    So to resume :
    – The shortcode as [wbcr_php_snippet id=”xx”] works fine
    – Same code but with [custom_name] breaks my website

    _____________________________________________________

    Here are some more details about my wordpress site
    WordPress version 5.4.2
    Theme : Avada (version 6.2.3)
    Plugin version : Woody ad snippets premium (version 1.0.6)
    PHP version 7.3.19-1~deb10u1

    Thanks for your help

    • This topic was modified 5 years, 9 months ago by qaresther.
    • This topic was modified 5 years, 9 months ago by qaresther.
Viewing 4 replies - 1 through 4 (of 4 total)
  • I understood the reason.

    The do_shortcode() function is already called in the plugin for custom snippet. This is why your code processes shortcodes first.

    This is of course our mistake. We will fix this in the next few days. For now you can use the standard shortcode

    Thread Starter qaresther

    (@qaresther)

    Hi Artem,

    Thanks for the reply, when do you think it will be fixed ?

    Many thanks

    This has already been fixed. Update the premium plugin on the Plugins page

    Thread Starter qaresther

    (@qaresther)

    Great, thanks !!

    • This reply was modified 5 years, 8 months ago by qaresther.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘shortcode working fine until given a custom name’ is closed to new replies.