• Hi Author, Thanks for the plugin…

    i am trying to redirect a page from 1 page to another page and revert back to the same original page after some seconds..

    The first redirect to sample from home is working fine…

    2nd trial redirecting from sample page to original page encountering an error for me..

    can u please rectify it..

    My error :- Parse error: syntax error, unexpected ‘<‘ in D:\xampp\htdocs\test\wp-content\plugins\insert-php\insert_php.php(48) : eval()’d code on line 1

    Code used:- [insert_php]<?php if(!isset($_GET[‘redirected_back’])) { echo do_shortcode(‘[redirect url=’http://localhost/test/&#8217; sec=’5′]’); }[/insert_php]

    https://wordpress.org/plugins/insert-php/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WillBontrager

    (@willbontrager)

    If it reports a syntax error then there’s an error in your code. See
    http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#errormessages
    for information about error chasing.

    Try removing the “<?php” from the code between the insert_php tags. Also check that your quotes are balanced and properly nested.

    Will

    Thread Starter ranjithgupta

    (@ranjithgupta)

    Thanks Will…. There was a problem with Quotes…

    But the loop is continuosly redirecting both the pages..

    page to single and again single to page… it is redirecting without break..

    can u help me out in stopping it for only 1 refresh…

    Plugin Author WillBontrager

    (@willbontrager)

    Unfortunately, I’m not in position to help you with your PHP code.

    For continuous redirects, something needs to arrest the redirect at the point you want it to stop. What that would be for your code, I really don’t know. Perhaps a cookie could be set to indicate the browser has been there already. But cookies aren’t reliable. WordPress doesn’t play nice with custom URL parameters, so I can’t recommend that method of tracking redirects. It may be time to rethink what you’re trying to accomplish and approach it from a different direction.

    Will

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parse Error When redirecting it to other Page’ is closed to new replies.