Allow PHP in Posts and Pages
Broken HTML output (2 posts)

  1. Crafty Coding
    Posted 3 years ago #

    I'm trying to simply output a link in the middle of a post. The echoed text is displaying before everything else in the post and as a result is in the wrong place.

    The code I'm trying to output is:

    echo "Hello World";

    And it shows before the divs that I have put it in.

    When I swap out the Hello World for my actual goal and I visit the actual page I get:

    Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_ENCAPSED_AND_WHITESPACE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /home/roteva/public_html/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(373) : eval()'d code on line 2
    The link I'm building is:
    "<a>loggedin_user->userdata->user_login . "/profile/edit/' class='profilelink'>Päivitä profiilisi</a> ja saat 100xp!";

    I've tried escaping, [php mode=old] and a heap of other things to no avail. Anyone had a similar problem?


  2. gjcoevert
    Posted 2 years ago #

    I had the same problem. As it seems, the plugin doens't handle nested in-tag php code properly. If you replace the tag "[" by the code of a specail character, this would solve your problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Allow PHP in Posts and Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic