Posted on Leave a comment

How to Test Something on One of Your WordPress Pages Without Others Seeing It

Here’s a quick tip for how to test something on one of your WordPress pages without others seeing it until you’re ready.

In your template file, place this PHP where you want to do you code testing.

<?php if($_GET['testMode']) { // Begin Test Stuff
?>

<!-- HTML / CSS / JAVASCRIPT / PHP / MYSQL -->

<?php } // Ends Test Zone
?>

Then when you go to your page, add the query string ?testMode=TRUE . Only the added string will trigger the testMode zone to appear. Code away knowing only you will be seeing things develop, but beware of syntax errors if you are playing with the PHP. They will bring the whole page down.

Once you’re good to go, just drop the two PHP sections that define the testMode zone. Now it’s Live!

Leave a Reply

Your email address will not be published. Required fields are marked *