RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

WordPress Features on a non-WP Page

The following code will allow you to create your own random pages while utilizing the full features of your WordPress installation. All you'll have to do is copy the following code into a blank file with a PHP extension. You'll have to be careful to ensure you correctly reference the wp-load.php WP file.

1
<?php 
2
require( '../wp-load.php' );
3
4
echo 'This is content outside of WordPress';
5

This code will display the WP header, footer and the text, "This is content outside of WordPress". If you wanted to include basic HTML in your page without the PHP entanglements, you could use:

1
<?php 
2
require( '../wp-load.php' );
3

This is content outside of WordPress

1
<?php 
2
get_footer();

If you choose to use shortcodes in your non-WordPress page, you'll have to use the following (remembering you're outside the loop).

1
<?php 
2
$content = "Content outside WordPress [MyShortCode]";
3
echo do_shortcode($content);

You can add widgets and other features... and use any other components of WP as required. However, in most cases, the feature isn't much different to a blank WP page.

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment