Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Do you mean a shortcode that would generate an HTML comment? It doesn’t exist currently – it looks like that could be included in the HTML blocks module.

    Just curious, is there an advantage to using a shortcode instead of direct HTML? I guess to make the comments visible in the visual editor?

    Thread Starter MarkPGray

    (@markpgray)

    I have a situation where I wanted to add a comment before the main shortcode using the visual editor to make things clear for the person editing the post.

    Plugin Author Eliot Akira

    (@miyarakira)

    I’m imagining something like:

    [--  your comment here  /--]

    That’s using the fact that - is a valid character for a shortcode name.

    Would that work for you?

    Thread Starter MarkPGray

    (@markpgray)

    Perfect. Thanks

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello, I added this feature in the newest update. It works like this:

    [*] Your comment here [/*]

    The shortcode doesn’t display anything on the frontend, so you can leave comments inside the visual editor.

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I had to change this shortcode to make it compatible with the visual editor in WP 4.3. Using [*] was nice and short, but it’s not a valid character for shortcodes anymore. Please use [note] instead.

    [note] Your comment here [/note]
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Shortcode for adding comments’ is closed to new replies.