Results 1 to 14 of 14
-
01-05-2020, 10:47 AM #1Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
How to add WordPress Header in WHMCS Client Area
I would like to add WordPress Header in WHMCS Client Area, so I tried the following code at header.tpl but I receive error
Check it: https://prnt.sc/qjmv7d
PHP Code:{php}
define('WP_USE_THEMES', false);
require('MyDomainPath/wp-load.php');
get_header();
{/php}
Any suggestions?
-
01-05-2020, 01:27 PM #2Knowledge is all
- Join Date
- Jul 2005
- Location
- here, there, where?
- Posts
- 4,101
The include requires a correct path to the wordpress files and unless you have mixed WHMCS and wordpress files in the same directory, that path wont work. Both installs should be in their own directory and the path should reflect that -- so example.com/wordpress/wp-load.php for example.
With that said, I would not recommend integrating wordpress with WHMCS like this or any other way beyond the data feeds WHMCS has for security. It would be better to replicate the HTML for the header in the header.tpl file in the template instead.
Moved to discussion forums as not an offer.-Steven | Cooini, LLC
"It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle
-
01-05-2020, 02:35 PM #3Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
-
01-05-2020, 05:18 PM #4Aspiring Evangelist
- Join Date
- Oct 2008
- Location
- México
- Posts
- 439
Yeah, it's seems like a fail path. Did you tried full path like /home/username...? the problem can be that cpanel does not recognize "same path" for subdomains.
█ Web Hosting
█ DirectAdmin + CloudLinux + CloudFlare + Softaculous + Site Builder
█ Uptime 99% + Friendly Support
-
01-05-2020, 05:54 PM #5Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
I have tried everything
/home/username/..
https://mydomain.com/wp-load.php
Always receiving the same error!
-
01-06-2020, 02:19 PM #6Aspiring Evangelist
- Join Date
- Oct 2008
- Location
- México
- Posts
- 439
try to use include instead of require might be it helps.
Regards█ Web Hosting
█ DirectAdmin + CloudLinux + CloudFlare + Softaculous + Site Builder
█ Uptime 99% + Friendly Support
-
01-06-2020, 02:40 PM #7
I don't see how it could.
Require breaks the page loading; include will simply not work (and potentially spit out an error to the page). He needs to start simpler, possibly including just a simple text file from that location to see if he can get *that* to show up from the place he's trying to get the WP header from, just to eliminate php and wordpress being the cause.
Start simple, when things break.Your one stop shop for decentralization
-
01-06-2020, 07:35 PM #8Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
-
01-06-2020, 07:36 PM #9Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
-
01-06-2020, 08:40 PM #10Knowledge is all
- Join Date
- Jul 2005
- Location
- here, there, where?
- Posts
- 4,101
You mentioned you tried /home/user.... but was that /home/user/public_html/wp-load.php ? This presumes the wordpress is within public_html and not an addon domain directory such as /home/user/example.com/wp-load.php .
Also both items need to be within the same user as otherwise security that is correctly setup would block access.
What error are you getting exactly?-Steven | Cooini, LLC
"It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle
-
01-06-2020, 08:56 PM #11Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
Yes I tried it with public_html (/home/user/public_html/wp-load.php)
I tried also to create a new php file in the same directory of (header.tpl), I tried to call it but also received the same error!
Check the error: https://prnt.sc/qjmv7d
-
01-06-2020, 09:27 PM #12Web Hosting Master
- Join Date
- Dec 2011
- Posts
- 1,460
"I've seen spam you people wouldn't believe. Routers on fire off the OCs of AGIS. I watched MXes burning in the dark near the Cyberpromo Gateway. All those moments will be lost in time, like tears in rain. TTL=0."
-
01-06-2020, 09:54 PM #13
-
01-06-2020, 09:57 PM #14Junior Guru Wannabe
- Join Date
- Aug 2019
- Posts
- 44
Similar Threads
-
wordpress-how to add 3 boxes in centre
By Manjusha4serveradmin in forum Web Design and ContentReplies: 5Last Post: 04-23-2011, 10:01 AM -
how to add NAT rule in APF?
By super2host in forum Hosting Security and TechnologyReplies: 4Last Post: 07-12-2008, 11:43 AM -
How to Add/Remove Cals in SQL 2005 standard
By boonchuan in forum Hosting Security and TechnologyReplies: 0Last Post: 03-31-2006, 12:08 PM -
How to add bulk reseller in WHM ?!
By NetGeek in forum Dedicated ServerReplies: 3Last Post: 10-12-2002, 09:12 AM -
how to add a module in raq3?
By sinet in forum Dedicated ServerReplies: 1Last Post: 01-08-2001, 12:07 AM