Title: Inserting Snippet
Last modified: August 22, 2016

---

# Inserting Snippet

 *  [naturistholidays](https://wordpress.org/support/users/naturistholidays/)
 * (@naturistholidays)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/inserting-snippet/)
 * Hi, just wondering how to get this working, I am trying to add the script that
   i have running here: [http://naturistholidays.com/holidays.php](http://naturistholidays.com/holidays.php)
 * The php i need to add is as follows:
 * <?php
    ob_start(); ?>
 * {VRL_LISTINGS}
 * <?php include ‘/home/naturist/public_html/login/app/views/pjLayouts/pjActionListings.
   php’; ?>
 * I have tried it in a few ways. adding the first section as a snippet then on 
   the wp page adding {VRL_LISTINGS} then the second snippet.. Also i have tried
   adding the whole lot as a snippet. All i get is a blank page: [http://naturistholidays.com/testhome/](http://naturistholidays.com/testhome/)
 * Any help would be appreciated
 * Kind regards
 * Ed
 * [https://wordpress.org/plugins/php-snippets/](https://wordpress.org/plugins/php-snippets/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/inserting-snippet/#post-5765069)
 * Documentation for the plugin is at [https://code.google.com/p/wordpress-php-snippets/](https://code.google.com/p/wordpress-php-snippets/)
 * I’m not sure what your “VRL_LISTINGS” is supposed to represent. If you’re getting
   a blank page, then that usually indicates a PHP error — so check your php logs
   or add this to your config file:
 * `define('WP_DEBUG', true)`
 * I would recommend that you use a dedicated folder to store your snippets: using
   the site’s root web directory is a poor choice because you could potentially 
   redundantly load up core WP files. The correct way to set this up is to use a
   sub-directory, and then properly reference the sub-directory in your Settings.
 *  Thread Starter [naturistholidays](https://wordpress.org/support/users/naturistholidays/)
 * (@naturistholidays)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/inserting-snippet/#post-5765075)
 * I am quite a noob. On the php script that i am using it gives me these instructions:
 * Step 1. Copy and paste the code below at the very top of your .php page. It should
   be line 1 of your .php web page.
    <?php ob_start(); ?>
 * Step 2. Copy and paste the code below into your html code, where properties will
   be displayed.
    {VRL_LISTINGS}
 * Step 3. Copy and paste the code below at the very bottom of your .php web page
   after all the other code.
    <?php include ‘/home/naturist/public_html/login/app/
   views/pjLayouts/pjActionListings.php’; ?>
 * I created the file: holidays.php following the steps above and this works however
   i would like to have this script run on the homepage within wordpress. I have
   tried so many different insert php plugins with no luck. I added the snippets
   to the default location where you added the test snippets.
 *  [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/inserting-snippet/#post-5765079)
 * I can’t debug someone else’s code for you, but it sounds like it might be a bit
   cleaner to modify your template instead of trying to add this as a snippet.
 *  Thread Starter [naturistholidays](https://wordpress.org/support/users/naturistholidays/)
 * (@naturistholidays)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/inserting-snippet/#post-5765089)
 * I would be happy to pay you to change the wp file so i could call the script 
   to the homepage just under the: Latest Naturist Holidays Photo Albums widget.
   I am unsure where to add the php code in the template. I guess once this is done
   i can just use the shortcode: {VRL_LISTINGS} to get the properties listed

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Inserting Snippet’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/php-snippets.svg)
 * [PHP Snippets](https://wordpress.org/plugins/php-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/php-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-snippets/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [naturistholidays](https://wordpress.org/support/users/naturistholidays/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/inserting-snippet/#post-5765089)
 * Status: not resolved