WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Post Snippets] How to add shortcode with content

[Resolved] [Plugin: Post Snippets] How to add shortcode with content

  • dashaluna
    Member

    @dashaluna

    Hello,

    How can I add a post snippet that would output a shortcode with the default content and closing tag, like so:
    [quote by="" from=""] Please type the actual quote here. [/quote]

    If I create a post snippet with 2 parameters, then it only outputs [quote by="" from=""] without a closing tag.

    I’ve tried adding the whole string [quote by="{by}" from="{from}"] Please type the actual quote here. [/quote] to the Snippet field in the admin, but it still only outputs [quote by="" from=""].

    How can I add the whole shortcode with a default content and closing tag.

    Many thanks,
    Dasha

    http://wordpress.org/extend/plugins/post-snippets/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Johan Steen
    Member

    @artstorm

    Hi,

    Ah, I see you want to use an enclosing shortcode. At the moment the plugin only supports creating self-closing shortcodes. ie it supports [shortcode attri=””] but not [shortcode attri=””]content[/shortcode].

    Supporting enclosing shortcodes would probably be useful though, so thanks for bringing it up. I’ll see if I can include it for the next update.

    Cheers,
    Johan

    dashaluna
    Member

    @dashaluna

    Hey Johan,

    Thanks for letting me know. Yes, that functionality would be really really helpful 🙂

    Keep me updated on it.

    Thanks,
    Dasha

    Plugin Author Johan Steen
    Member

    @artstorm

    Hey,

    I just wanted to let you know that I’ve now updated the plugin to v1.8.2 which can handle enclosed shortcodes. When having text enclosed between the shortcode tags, that text is now available by using {content} in your snippet. The {content] variable is automatically assigned so don’t set it in your variables field.

    Cheers,
    Johan

    NilsHolmstrom
    Member

    @nilsholmstrom

    Hi!

    I am wondering if the plugin will support adding closing-shortcode via the TinyMCE-button?

    Dreadpoule
    Member

    @dreadpoule

    Hello ! When I put {content} in my shortcode, it’s used like simple text, {content} appears in my page instead of the content selected.
    Can you help me ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: Post Snippets] How to add shortcode with content’ is closed to new replies.