How do I put a shortcode inside a shortcode?

by 3 replies
4
I am using Karma Theme (TrueThemes) and want to put a WP LinkLock code in the button shortcodes.

Here is the button shortcode ...

[button url="http://" target="_self" size="small" style="royalblue" ]Click Here to Download Your eBook![/button]

Here is the LinkLock basic code ...

[LINKLOCK text="Local File"]filename.pdf[/LINKLOCK]

Button code wants a url, linklock creates a url ... can this be done? I want to use the linklock code, but have the nice looking button.

Thanks,

Todd
#programming #inside #put #shortcode
  • Depending on the shortcode, it might not be possible to do so. Please provide the webpage with said shortcodes so that I may view the source code.

    Anyway try this:
    [button url="http://" target="_self" size="small" style="royalblue" ][LINKLOCK text=”Local File”]filename.pdf[/LINKLOCK][/button]

    I doubt if it would work though.

    Perhaps you should use anchor html and images.

    <a href="linktopdffile"><img src="imgfilepathofroyalbluebutton"/></a>
    • [ 1 ] Thanks
  • read up on nesting short codes to achieve what your trying to do, of course you could always hard code the button design your self rather than having the button as a shortcode...

    Shortcode API « WordPress Codex
  • The page is inside of a membership site, so unable to direct you there.

    I had tried the shortcode replacing the text before, it didn't work.

    The anchor html and images worked after I removed the "text="Local File". It's working now, thank you so much for the tip.

    Todd

Next Topics on Trending Feed