How to run php code in smarty template file?

admin

Administrator
Staff member
I want to load wordpress in a smarty template. I used the code below to load wordpress in a php file and it worked. But it is not working a smarty template.

In php file:

Code:
<?php
include $_SERVER['DOCUMENT_ROOT'].'/wordpress/wp-load.php';
get_header();
?>

In smarty template file:

Code:
{php}
include $_SERVER['DOCUMENT_ROOT'].'/wordpress/wp-load.php';
get_header();
{/php}