WordPress.org

Forums

Post Snippets
Avoid Parse Errors when using php tags or inline HTML (1 post)

  1. Bozz
    Member
    Posted 1 year ago #

    Great plugin! I'm trying to use a snippet that has HTML and PHP. I noticed PHP only processes if you check 'php code' and leave off the <?php tags (eg: echo 'hello';)

    Whenever I include php tags or HTML, it won't render properly and you get the following error:

    Parse error: syntax error, unexpected '<' in /home/user/public_html/new/wp-content/plugins/post-snippets/src/PostSnippets/Shortcode.php(98) : eval()'d code on line 1

    Is there any way to include php tags or inline HTML in the same Post Snippet? Thanks for any insight.

    https://wordpress.org/plugins/post-snippets/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Snippets
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.