Home › Forums › WordPress Plugins › Hide My WP › How to enable HMWP on an External WP page
- This topic has 30 replies, 3 voices, and was last updated 7 years, 10 months ago by Hassan.
-
AuthorPosts
-
January 26, 2017 at 12:03 pm #14282
Thank you for your reply dear Hassan,
First please note that This is not a simple HTML page, this is WHMCS and I should write codes based on smarty directives in their templates.
Regarding your suggestions :
– It is already Full Page replacement.
– Using : require(‘wp-blog-header.php’); –> It just did not work. It returns with blankpage..
– As I mentioned this .tpl files of WHMCS which are based on smarty. And below is the code which actually I am using :
{php} define('WP_USE_THEMES', FALSE); require('/var/www/vhosts/domain.com/webspace/wp-load.php'); {/php} {php} get_header(); {/php}
– And finally I do not use any caching plugins.
I would really appreciate your help.
January 26, 2017 at 12:54 pm #14283HassanPost count: 955First please test my previous code to ensure the problem is WHMCS not WP.
In that case, there may be many potential problems. Personally, I don’t think bringing the entire WordPress into WHMCS is a good idea.
If you want to show a page from WP on WHMCS you can also use rewrite rules or CURL (or file_get_contents) to get the page source. Something like this:
file_get_contents('http://wpsite.com/' . $_SERVER['REQUEST_URI'))
If you just need WP header you can create an external page on WP directory with only header and then load it using above approach.
January 26, 2017 at 1:05 pm #14284You mean this code?
define('WP_USE_THEMES', FALSE); require('wp-load.php'); echo 'http://127.0.0.1/wp39/wp-content/uploads/2016/02/CY5iXfzUAAA0Ucj-70x70.jpg';
I tested it and it does not work.
(I replaced my WP details with yours of course)
What I need is to have header and footer of my WP in all WHMCS pages.
I searched a lot and I believe this is the only way to have this in regard of WHMCS.
And actually this is the article which I used to do this :
https://squidix.com/library/how-to-include-wordpress-header-footer-in-whmcs/- This reply was modified 7 years, 11 months ago by alichakery.
January 26, 2017 at 1:15 pm #14286HassanPost count: 955Please provide FTP access as a private reply and I’ll take a deeper look.
January 26, 2017 at 1:24 pm #14287This reply has been marked as private.January 26, 2017 at 1:56 pm #14288HassanPost count: 955This reply has been marked as private.January 26, 2017 at 2:01 pm #14289This reply has been marked as private.January 26, 2017 at 2:04 pm #14290HassanPost count: 955Didn’t help, seems it’s because SSL is require or something like that.
January 26, 2017 at 2:07 pm #14291This reply has been marked as private.January 26, 2017 at 2:34 pm #14292HassanPost count: 955This reply has been marked as private.January 26, 2017 at 2:41 pm #14296This reply has been marked as private.January 26, 2017 at 3:23 pm #14300HassanPost count: 955This reply has been marked as private.January 26, 2017 at 5:13 pm #14302This reply has been marked as private.January 28, 2017 at 11:39 am #14314HassanPost count: 955Sorry Ali, I have no new idea on this case.
This is first time I encounter with that syntax but I don’t think there is anything wrong with it. If it works you probably can go with it for a while if there was no issue then continue using it.
January 28, 2017 at 11:57 am #14315Dear Hassan,
Really appreciate your help.
I believe this is either WHMCS’s issue -OR- having a separate hosting account for my subdomain.
This is really sad that it is not possible for me to use HMWP on my billing system.
Please keep me updated if you found some way to solve it.
Good luck.
خدانگهدار
-
AuthorPosts
You must be logged in to reply to this topic.