Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forum: Hacks
    In reply to: Add WP Code to Non-WP Site
    Thread Starter Dave LeDev

    (@dave-ledev)

    Hm, definitely some kind of conflict with Smarty and/or FSB. Created a test.php with the provided code, and works fine.

    Forum: Hacks
    In reply to: Add WP Code to Non-WP Site
    Thread Starter Dave LeDev

    (@dave-ledev)

    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');
    	}
    ?>
    Forum: Hacks
    In reply to: Add WP Code to Non-WP Site
    Thread Starter Dave LeDev

    (@dave-ledev)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)