Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Help! WordPress


We have been left high and dry by a developer who finished half a job... What was done was done really well, and all the details on how it was done are available. The second part is literally a clone of the first part, just linking different data. If I had half a brain I could probably figure this out myself, but then, if....
I am looking for somebody who can give me 10 minutes of their time to copy the PHP code already written, and make it use the second set of data. The first set of data can be seen here: If you click on the "Holiday lets" menu item, it will show you a page with a few sample properties on it. The content of this page does not come from Wordpress, and is not a iframe. The page is generated by a script living in a different directory.

this is how it was done (the exact words from the guy who left us with half the job done)

It's quite simple. I have overridden the template for the page by creating a page-117.php file in the WP theme directory. If you go to that page directly, you will see a {VRL_LISTINGS} tag. All I need to do is to redirect users who go to that page directly to the actual test.php page.

On the test.php page, I do a GET request to Then, I followed the Install instructions for the Vacation Rental script and then it replaces the {VRL_LISTINGS} tag with the actual page rendered by the script.

We need the exact same link done for the package deals, which also come from a (different!) script living in diffrent directory. We know from the guy that this is literally a copy and paste job, and a matter of changing a few things in the code so that the package deals are shown rather than the holiday lets. He told us it would not take more than 10 minutes to implement this. That was 2 weeks ago, hasn't been heard of since...

Answers (3)


Hariprasad Vijayan answers:


Your situation is not clear from the question.

I have few doubts about {VRL_LISTINGS} tag and test.php.

Yiannis comments:

the {VRL_LISTINGS} tag comes from the script generating the rental pages, it is part of the setup-procedure for this script.

<blockquote>Step 2. Copy and paste the code below into your html code, where properties will be displayed.

However, as the script does not integrate into WP and includes payments modules, iframe is not a option. It's messy anyway.... The test.php was the initial test page generated using the {VRL_Listings} for the development proposal. If you go to the site and click on the holiday lets menu, you will see the URL now calls it "lets.php"

Hariprasad Vijayan comments:

I think your requirement is exact clone of "Holiday Lets" in "Package Deals" with different content. Right?

When i try to access it redirects to and it is not a wordpress page it pull the information from using the tag {VRL_LISTINGS} i think. Can you sent FTP details in PM?

Hariprasad Vijayan comments:

Are you using any other framework than wordpress?

Yiannis comments:

As I already said, the script that generates the content on "Holiday lets" lives in a different directory, and is indeed not Wordpress. It is a PHP script. All the details for holiday lets are entered in the back office of this script, which is not integrated into Wordpress, it's a seperate directory. On the user end the page generated by this script is shown in a clone of the wordpress page Holiday lets pageID 117.What happens is that the wordpress template for holiday lets page ID 117 is cloned into a page called page 117 in the wordpress Themes directory. The page "lets.php" lives in the www.root directory and uses the {VRL_listings} tag to render the page from the other script and it is shown in the clone of Holiday lets Page117. Any visitor to the site is not aware of the fact that they are actually looking at something that is not in Wordpress, and this set-up allows us to display the holiday lets INCLUDING the payment options etc, which would not be possible using iframe. That much I do know.
So yes, we need this exact same set-up cloning in such a way that it displays the package deals generated from the script on the package deals page. I have sent you the ftp details. There are other people working at different things there, so before you do anything please tell me what you are going to do and where you intend to do it, so that I can make sure you don't interfere with what others are doing, and visa versa.

Hariprasad Vijayan comments:

Are you using any custom plugin for processing {VRL_LISTINGS} ?

Hariprasad Vijayan comments:

I can't see any functions that processing {VRL_LISTINGS} in function.php or other files. Let you know before making any change. Am checking files to find the function.

Yiannis comments:

I'll tell you again, the function {VRL_LISTINGS} has nothing to do with the Wordpress setup.
It is a function that comes from the Rentals script. Once the retals script is set up, and rental properties have been added to the admin of the Rentals script, you need to display these rentals on a web page. Normally speaking you would create a .php web page and do the following:

you tell the script where this page lives

you make line 1 of your .php web page this:


(Check lets.php to see this)

in the HTML code of the .php web page, where you want the listings to appear, you add the function {VRL_LISTINGS}. This function displays the properties.
You can (it's optional) also add this function inside the <head> tags of your page :{VRL_META}

Finally, you add the path
<?php include '/home/jguervo/public_html/rentals/app/views/pjLayouts/pjActionListings.php'; ?>

to the very bottom of your .php web page. It's the last line of code.

Now your PHP web page displays the properties.

This can't be done directly in wordpress. iframe doesn't work. apart from it being a mess, it will not pull in payment pages from PayPal or so. So we needed another solution. Which is what we have, kind off...

Hariprasad Vijayan comments:

I understood this. Can you join in skype? Sent my skype id in PM. Please check.

Yiannis comments:

sorry, no skype. Doesn't like Greek phone lines, drops calls for fun. Not worth the headache...

Hariprasad Vijayan comments:

Rename package-deals.php in your theme folder to page-package-deals.php then it will redirect to lets.php of root directory.

Hariprasad Vijayan comments:

You can create new file in root directory with following code
For Eg: create a file test.php
change the following line of page-package-deal.php(Renamed file)
header('Location: /lets.php');
header('Location: /test.php');
The code in test.php should be


echo file_get_contents('');

include '/home/jguervo/public_html/rentals/app/views/pjLayouts/pjActionListings.php'; ?>

Then it redirect to package deal again, and render {APP_TPL}. If the {APP_TPL} is functioning you will get out put. I doubt it is not functioning.


Arnav Joy answers:

by {VRL_LISTINGS} you mean the posts that are listed there?

Yiannis comments:

If you want to call them post... The tag {VRL_LISTINGS} generates the listings you see on holiday lets. These listings are however not generated from within WordPress, they are generated in a seperate script which is somehow pulled in to wordpress, as briefly explained above. The developer created 2 pages. As he says, he overwrote the original WP page (page ID 117) using this code


if ( ! isset($_GET['in_vacation_rental']) && $_get['in_vacation_rental'] !== 'true') {
header('HTTP/1.1 301 Moved Permanently');
header('Location: /lets.php');

get_header(); ?>

<div class="span8">

<?php get_footer(); ?>

He then created the lets.php page, which gives this code


echo file_get_contents('');

include '/home/xxxxxxxx/public_html/rentals/app/views/pjLayouts/pjActionListings.php'; ?>

(I changed the actual directory to xxxxxxxxx for this post.)

I need exactly the same done for the Package deals page on The package deals are generated in another script using a different tag. So what I am looking for is for somebody who can adapt the above code to overwrite the template for the exising WP page, and point visitors directly to packages.php (the replacement of lets.php) and display the correct data on packages.php These data are generated by a script called Vacation Packages Listing Script which lives in a seperate directory and uses the tag {APP_TPL} to render the appropriate page.

The original developer told us this would simply involve changing the in_vacation_rental bit in

if ( ! isset($_GET['in_vacation_rental']) && $_get['in_vacation_rental'] !== 'true').........etc.

It would also require the changing of lets.php to, the {VRL_LISTINGS} tag to {APP_TPL} and the path in


to the correct location in the packages directory.

I can change the page names and the tag, I'm not too sure about the path, but have no idea what to change [in_vacation_rental] to or what it refers to. I am unfortunately not a programmer...


Eric P. answers:

The code you're describing sounds really ugly.

The way you describe it now, it will break when (not if) you upgrade your theme.

For just a bit more effort (and resources), you could have someone who knows WordPress convert that code into a plugin that implements it as a "shortcode" so you can include these listings on any page on your site.

I've sent you a PM here, I'm interested in working on this, but more information is needed.

Yiannis comments:

Strange, I can't see any PM. in fact, there doesn't seem to be a PM system attached to my profile?

Yiannis comments:

Yes, I know. but we have to start somewhere, you know why....

I'm fairly confident I can replicate the existing set-up to get the other script working as well, providing I can figure out what this refers to, and find what to replace it with.

if ( ! isset($_GET['in_vacation_rental']) && $_get['in_vacation_rental'] !== 'true')

it's the ['in_vacation_rental'] bit that I need to replace. What does it refer to, and what do I replace it with?

the rest, including the path, I have worked out.