Jump to content

How to Configure WHMCS Template to Match my Wordpress Website


adamjedgar

Recommended Posts

Hi guys,

i know this has been brought up before (probably numerous times i expect), however, as there is an old whmcs tutorial "WHMCS Creating a Custom Template" on youtube, i need to ask this again.

Like others before me, if i wanted to pay money for integrations, i would not be here asking this question...this is a community community where people share their expertise and experiences. In the past i have purchased whmcs themes, however, i have been very disspointed in what i have ended up with. In looking at some of the recent ones, i am still very unsure if they are worth the money (in some cases i am convinced absolutely not...even for some whmcs themes costing $129). As an example, a number of  "advertised as whmcs themes", in fact are Wordpress themes which then require the use of a paid for wordpress integration plugin in order to function correctly with whmcs. This is not particularly desirable or honest in my opinion...so that brings me here posting this question.

I am an real fan of Wordpress, and use the Avada Wordpress framework to build websites quite often. I am not a coder, but do understand html and css basics. It s just that the source code for my wordpress website built using avada appears to contain a lot of coding that i believe may be unneeded for whmcs custom template.

I have already opened my wordpress website  and in chrome am going through the "View Page Source", however, any hints to save some time grinding my way through it would be appreciated.

in the meantime, I am using the "trial and error approach"

 

kind regards,

Adam

 

Link to comment
Share on other sites

I'm going to say something unpopular. Don't use Wordpress.

I know that using Wordpress & WHMCS seems the right choice and the easiest approach but in the long run it's not. You have two systems to maintain, two separate admin interfaces, you double the risk of something going wrong and most important you'll be afraid to update both softwares. In my experience integrations are not so reliable and like you said there's a lot of unnecessary code involved. Keeping integrations and templates functional is not impossible but frustrating.

Personally I took a different approach. I need WHMCS but I also need to publish contents. Since the majority of features I need are in WHMCS, I decided to focus on this system adding the missing pieces like news, blog posts etc. Before you ask no, I'm not talking about the standard announcements section. I will no longer invest my time an money in having unhandy and unreliable integrations.

Edited by Kian
Link to comment
Share on other sites

On 9/26/2018 at 7:55 PM, Kian said:

I'm going to say something unpopular. Don't use Wordpress.

I know that using Wordpress & WHMCS seems the right choice and the easiest approach but in the long run it's not. You have two systems to maintain, two separate admin interfaces, you double the risk of something going wrong and most important you'll be afraid to update both softwares. In my experience integrations are not so reliable and like you said there's a lot of unnecessary code involved. Keeping integrations and templates functional is not impossible but frustrating.

Personally I took a different approach. I need WHMCS but I also need to publish contents. Since the majority of features I need are in WHMCS, I decided to focus on this system adding the missing pieces like news, blog posts etc. Before you ask no, I'm not talking about the standard announcements section. I will no longer invest my time an money in having unhandy and unreliable integrations.

3

I particularly focus on your last comment "I will no longer invest my time an[d] money in having unhandy and unreliable integrations."

 

The disavantage of the above approach you talk of is, in order for one to extend their webpage in whmcs, it seems to me that a lot of work is required. In Wordpress, this is but a small almost effortless task (especially with the Avada Wordpress theme/framework i use which is 90% "drag and drop" and shortcodes for everything else), and this is where i am at a crossroads...the much shorter long-sighted road is the Wordpress one because of the ease with which Wordpress websites can be upgraded and modernised. Playing around with the smarty templating system in whmcs editing layouts and creating addtional pages and functionality, is nothing short of a time consuming pain in the ass!

 

What about the option to use both on parent domain + subdomain arrangement in a non-integrated arrangement. Wordpress for the main website, then url link to the whmcs interface on the sudomain for ecommerce stuff (such as hosting, domains, renewals etc)? In using this method i am essentially keeping both separated. It would mean that clients cannot log into wordpress and that login be used to access whmcs (which i would not want anyway).

 

So if i were to take my above mentioned approach, reskinning whmcs is my next hurdle. As i said in first post, there seems to be an awful amount of source code when i "inspect" my wordpress page in google chrome. 

Edited by adamjedgar
Link to comment
Share on other sites

@adamjedgar it would be my recommendation to simply use WHMCS service to create you a matching theme for your Wordpress website. You can order this solution here https://www.whmcs.com/members/cart.php?a=confproduct&i=0

I do also understand if you want to achieve this on your own. You can fairly easily integrate your Wordpress header and footer into your whims template by using the following method. ( This is what I did )

First step is to bring in the WordPress core into your header.tpl

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

Next, call WordPress Header functions into your header.tpl

{php}
 get_header();
{/php}

Next, call WordPress Footer functions into your footer.tpl

{php}
 get_footer();
{/php}

As far as the rest of the WHMCS styling, buttons etc you will need to do some css changes to reflect your Wordpress design.

This topic has been discuss a number times and the common consensus is to still use a professional service like the one I mentioned above.

Credits for this solution are from here https://squidix.com/blog/include-wordpress-header-footer-whmcs/

As I said, this is how I have integrated my main sites design into whims and I'm happy to help where I can.

Link to comment
Share on other sites

3 hours ago, adamjedgar said:

 is nothing short of a time consuming pain in the ass!

Of course my approach takes longer and is way more complicated. The question here is that after more than 10 years of WHMCS, I had enough of repeating myself with every client of mine asking for integration that sooner or later breaks with updates.

That's why for me it was worth investing time in the opposite direction. This way I no longer have to create two copies of the same template full of unnecessary code and deal with limitations (2 admin interfaces is a big no).

Link to comment
Share on other sites

8 hours ago, shadowtek said:

You can fairly easily integrate your Wordpress header and footer into your whims template by using the following method.

if you're going to do that, you might as well use a hook to add the code in the header/footer - because it will be interesting to see what happens in v8 if the temporary enablement of {php} finally gets removed (it's already been removed from Smarty)... when that happens, your current solution won't work.

Link to comment
Share on other sites

On 28/09/2018 at 8:58 PM, brian! said:

if you're going to do that, you might as well use a hook to add the code in the header/footer - because it will be interesting to see what happens in v8 if the temporary enablement of {php} finally gets removed (it's already been removed from Smarty)... when that happens, your current solution won't work.

Thanks @brian! for the heads up..

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
On 9/28/2018 at 3:58 AM, shadowtek said:

@adamjedgar it would be my recommendation to simply use WHMCS service to create you a matching theme for your Wordpress website. You can order this solution here https://www.whmcs.com/members/cart.php?a=confproduct&i=0

I do also understand if you want to achieve this on your own. You can fairly easily integrate your Wordpress header and footer into your whims template by using the following method. ( This is what I did )

First step is to bring in the WordPress core into your header.tpl


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

Next, call WordPress Header functions into your header.tpl


{php}
 get_header();
{/php}

Next, call WordPress Footer functions into your footer.tpl


{php}
 get_footer();
{/php}

As far as the rest of the WHMCS styling, buttons etc you will need to do some css changes to reflect your Wordpress design.

This topic has been discuss a number times and the common consensus is to still use a professional service like the one I mentioned above.

Credits for this solution are from here https://squidix.com/blog/include-wordpress-header-footer-whmcs/

As I said, this is how I have integrated my main sites design into whims and I'm happy to help where I can.

Thanks boss but this code breaks when I tried using it.

I have already enabled smarty php in my whmcs version 7.7 and inserting the codes above directly into the header.tpl and footer.tpl crashed the platform...

Kindly help me with the step by step guide on how to go about this. Thanks

Link to comment
Share on other sites

On 3/1/2019 at 8:27 AM, ebbydare said:

I have already enabled smarty php in my whmcs version 7.7 and inserting the codes above directly into the header.tpl and footer.tpl crashed the platform...

How does it crash exactly?  It should provide an error of some kind .  If you are only seeing an "oops" page with no additional info, enable displaying errors under setup -> other tab.  

Though with that said, I would advise not to integrate wordpress with WHMCS beyond using the WHMCS data feeds available or custom ones.   Reason being if wordpress is hacked, which is possible, then they can get access to WHMCS also and thus all your client info.  Applications should really be separated by server users also but I digress. 

Using the domain and sub domain for WHMCS is what I would recommend.  I do that personally, though use a site builder and not wordpress for the site.  Just get WHMCS to look similar to the wordpress theme or do a completely different look to make it stand out more.  Then on the regular site, have links to WHMCS login pages and toss the wordpress login links away.   Would users really need to access wordpress? 

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