WordPress.org

Ready to get started?Download WordPress

Forums

Smart WYSIWYG Blocks Of Content
[resolved] Feature request: use smartblock slug within shortcode (7 posts)

  1. SiteSubscribe
    Member
    Posted 2 years ago #

    Feature request: use smartblock slug within shortcode

    Love the plugin. I really like the fact that it uses CPT and supports both shortcodes and widgets.

    When using shortcodes, if you come back later and look at the shortcode used to insert a smart-block it is hard to tell what content you are inserting.

    [smartblock id=4087] doesn't tell you what it is unless you go look up your smart-blocks (very tedious) or put a comment within the page along with the shortcode.

    It would be nice to be able to use:
    [smartblock id='my-smartblock-slug']

    Thanks,
    Jeff

    http://wordpress.org/extend/plugins/smart-wysiwyg-blocks-of-content/

  2. Coen Jacobs
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for this feature request. It does make sense to me, I will add it in the next version of this plugin with a second parameter. If id is provided, it will use that, if slug is provided and id is not it will use the slug parameter.

    It will be available in the next release of the plugin.

  3. SiteSubscribe
    Member
    Posted 2 years ago #

    Cool, thanks!

    That's exactly how I envisioned it should work.

  4. Olaf Lederer
    Member
    Posted 2 years ago #

    Hi Coen,

    changed your short code a little to get it working in my category theme. Since the "default" slug argument is for a single post, it makes sense to turn the if statement (if slug use slug and otherwise use the ids)

    I hope that I don't get punished while posting the code here :)

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  5. jmccormick626
    Member
    Posted 2 years ago #

    I can't seem to get the slug to work. I use [smartblock id=services-offered] & [smartblock slug=services-offered] both WITH & without single & double (' & ") quotation marks.

    What am I doing wrong to get it to recognize the slug option described above?

  6. Coen Jacobs
    Member
    Plugin Author

    Posted 2 years ago #

    This is not something that is released already, it will be available in the next release.

  7. jmccormick626
    Member
    Posted 2 years ago #

    ok. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic