Home Forums WordPress Plugins Hide My WP How to enable HMWP on an External WP page

This topic is: not resolved
Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #14282
    alichakery
    Pro
    Post count: 50

    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.

    #14283
    Hassan
    Post count: 955

    First 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.

    #14284
    alichakery
    Pro
    Post count: 50

    You 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 4 years, 3 months ago by alichakery.
    #14286
    Hassan
    Post count: 955

    Please provide FTP access as a private reply and I’ll take a deeper look.

    #14287
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14288
    Hassan
    Post count: 955
    This reply has been marked as private.
    #14289
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14290
    Hassan
    Post count: 955

    Didn’t help, seems it’s because SSL is require or something like that.

    #14291
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14292
    Hassan
    Post count: 955
    This reply has been marked as private.
    #14296
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14300
    Hassan
    Post count: 955
    This reply has been marked as private.
    #14302
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14314
    Hassan
    Post count: 955

    Sorry 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.

    #14315
    alichakery
    Pro
    Post count: 50

    Dear 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.

    خدانگهدار

Viewing 15 posts - 16 through 30 (of 31 total)

You must be logged in to reply to this topic.