• Resolved wpawesomeadelaide

    (@wpawesomeadelaide)


    To all of those wanting to put HTML code within the snippet content like this:

    [ArticleCredits]<a href="http://www.google.com/">Google</a>[/ArticleCredits]

    if (is_single()) {
     echo "Article Credits: {content}<br/>";
    }

    Edit line 47 of Shortcode.php from

    if ( $content != null ) {
                                    $attributes["content"] = $content;

    to

    if ( $content != null ) {
                                    $attributes["content"] = addslashes(addslashes($content));

    https://ww.wp.xz.cn/plugins/post-snippets/

The topic ‘Solution: HTML Code in Snippet Content’ is closed to new replies.