Viewing 2 posts - 1 through 2 (of 2 total)
    • Author
      Posts
    • runggi
      Guest

      Hi,

      my WordPress Version is 3.9.2 > Shortcoder 3.4.

      Shortcoder not working in frontend!

      Example:

      BE PLUGIN:

      %%myText%% »

      BE EDITOR:

      [sc:Button myLink=”http://www.designquartier.at” myText=”Mein Text” ]

      Frontend – Website:

      »

      The parameters are not passed – space left blank!

      Please help!

      Anonymous
      Guest

      After spending FOUR HOURS looking at this, I finally figured out what’s wrong.

      I mean, I wrote test code after test code, thought there was something wrong with the PHP str_replace() function… Or that %% was now reserved in newer versions of PHP or something, so tried ,, instead of %% … on and on.

      Anyway, I determined that if you use mixed case (for example %%myLink%% and %%myText%%) that it will not work. I was using %%tipContent%%. Because what was being passed to the Shortcoder function was not what you put into your post. %%tipContent%% becomes %%tipcontent%%. Not the same!!

      Why? This portion from the WordPress Codex about the Shortcodes API:

      Quote:

      IMPORTANT TIP – Don’t use camelCase or UPPER-CASE for your $atts attribute names

      $atts values are lower-cased during shortcode_atts( array( ‘attr_1’ => ‘attr_1 default’, // …etc ), $atts ) processing, so you might want to just use lower-case.

      So, use all lowercase. %%mylink%% and %%mytext%%. I’m surprised the developer used a mixed case parameter example right there on the shortcode editor page!!

      Peace out. I have a headache now 🙄

    Viewing 2 posts - 1 through 2 (of 2 total)
    • The topic ‘parameters not work / transferred to the FE’ is closed to new replies.

    Subscribe for updates

    Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter