This might help:
I’m not familiar with FresshStoreBuilder but if you can add this code to the header of the pages it creates add this line:
<?php require( 'YOURWORDPRESSDIRECTORY/wp-load.php' ); ?>
Then you can use
<?php get_header(); ?>
and
<?php get_footer(); ?>
where ever you need them. You can even do queries and other WP functions.
Looks like FreshStoreBuilder has implemented the use of Smarty in their latest version, so that’ll take a little bit to figure out. I greatly appreciate the lines of code!! I’ll let you know if I get this working.
Hmm, I’m getting thrown this error:
Fatal error: Call to a member function get() on a non-object in /home/iconicga/public_html/wordpress/wp-includes/query.php on line 27
Here’s the code I added in Smarty, maybe you can see a syntax error or something:
/home/iconicga/public_html/library/smarty/plugins/function.wp_incl.php
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: function.wp_incl.php
* Type: function
* Name: wp_incl
* Purpose: enables WordPress coding
* -------------------------------------------------------------
*/
function smarty_function_wp_incl($params, &$smarty)
{
require('/home/iconicga/public_html/wordpress/wp-load.php');
}
?>
Hm, definitely some kind of conflict with Smarty and/or FSB. Created a test.php with the provided code, and works fine.