0
votes

Sorry if this is confusing as I am quite new to php/wordpress. Anyways, I have a website. The home page is currently an html file. I have a separate Wordpress blog page. My blog page has a blank template that I have modified to suit my own needs and I have essentially recreated the entirety of the blog page (well, just the header/navigation areas) on the homepage and plan to have links to different blog posts.

The thing is, my blog page has a search function. How would I include this on my home page? I am assuming I need to save my html file as a php file first and link to the blog php file? Then can I use the "get_header" function to generate the navigation?

Thanks

2

2 Answers

0
votes

You can't do that without using an iframe back to the wordpress site. In order to use the wordpress functions it has to load the entire framework. Why don't you just set your wordpress site to have a static front page, and make that be your home page.

0
votes

You can include wp-load.php to access wordpress functions outside of wordpress. You can include it using something like

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

More info here