Jump to content

Integrate wordpress into whmcs custom template


Hagai

Recommended Posts

Hi guys

 

My website is working via wordpress cms.

I tried to integrate wordpress in the header.tpl and footer.tpl in my custome template I am creating.

 

I am using smarty and it generates the errors.

 

Firstly I tried to do it using the tutorial:

http://docs.whmcs.com/Client_Area_Template_Files

(I followed the tutorial and copied the relevant files of .js and .css to the template directory)

 

I received the following error from the cache file created by whmcs:

"Notice: Undefined index: livehelp in /home/XXX/XXX/templates_c/%%02^027^0277F14F%%header.tpl.php on line ..."

The code that creating this is

<?php if ($this->_tpl_vars['loggedin']): ?>

and it created by the original code {if $loggedin} inside the header.tpl that resides in my custome template in line 43.

 

Also the main menu did not apear in the client area webpages.

 

 

Then I used this post:

https://squidix.com/library/how-to-include-wordpress-header-footer-in-whmcs/

 

* every time I am adding the following code:

{php}
define('WP_USE_THEMES', FALSE);
require('mypath/wp-load.php');
{/php}

 

only before the {if $loggedin} then it generates the error:

"Notice: Undefined index: loggedin in /home/XXX/XXX/templates_c/%%02^027^0277F14F%%header.tpl.php on line".

 

Also if I am adding the following code

{php}
get_header();
{/php}

 

only before the {if $loggedin} then it generates the following errors:

"Notice: Undefined index: livehelp in /home/XXX/XXX/templates_c/%%02^027^0277F14F%%header.tpl.php on line"

 

But here the main menu is shown in the client area webpage.

 

Please help.

I will appreciate any assistans.

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated