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

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

    Hello,

    I have used smarty codes to include WP header and footer in an another script to integrate my WP with that script.

    This is an example of the code which I used :

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

    but unfortunately HMWP does not work in the external page/script.

    So I would really appreciate if you help me to solve this issue.

    Thank you very much.

    #14124
    Suman M.
    Post count: 12478

    Hi, HMWP doesn’t physically change any file path, so the original WP paths “/path/to/wordpress/wp-load.php” should work fine with or without HMWP.

    What’s the error you are getting in the above mentioned code?

    #14125
    alichakery
    Pro
    Post count: 50

    I have no error,

    I want HMWP. Also work on that external page. Because in that external page every file hich is loaded from wordpress has the default path like “wp-content/….”.

    Would you please tell me hownto make hmwp work on that external page .

    Thank you

    #14127
    Suman M.
    Post count: 12478

    You don’t need to change anything in PHP code like require(‘/path/to/wordpress/wp-load.php’);, as this is not viewable by the site visitors. You can simply concentrate on hiding WP default paths in your website’s page source.

    #14128
    alichakery
    Pro
    Post count: 50

    I have done it..in the wordpress itself everything hidden…

    but all wp files like css and js loaded in the external one are default wp paths.

    #14129
    Suman M.
    Post count: 12478

    Can you please generate debug report from HMWP start tab and post it here as private reply?

    #14132
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14136
    Suman M.
    Post count: 12478

    Please try adding the following replacements in “replace in html” option under HMWP replace tools tab:

    wp-content/themes/genesis/ ==> skin_main/
    wp-content/themes/epik/ ==> skin/
    wp-content/plugins/ ==> mods/

    #14137
    alichakery
    Pro
    Post count: 50
    This reply has been marked as private.
    #14149
    Suman M.
    Post count: 12478

    It might be because of the external page you have created. I have assigned this ticket to sr. support so that he can look further into it.

    #14177
    alichakery
    Pro
    Post count: 50

    Any updates ?

    #14220
    alichakery
    Pro
    Post count: 50

    Any solutions ? !!!!

    #14267
    alichakery
    Pro
    Post count: 50

    Its now 7 days … and still no answer !!!!

    #14270
    Suman M.
    Post count: 12478

    Hi, sorry for the delay. The sr. support has been quite busy recently. I have reminded him again.

    #14280
    Hassan
    Post count: 955

    Sorry for delay,

    I tested and it works nice on my setup.

    Here is my tested 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';

    Some Advises:
    – Make sure you enabled Full Page as replace mode.
    – Try using require('wp-blog-header.php'); instead of your provided code.
    – Try printing content by PHP (NOT raw HTML).
    – Disable Caching plugins

    • This reply was modified 7 years, 11 months ago by Hassan.
Viewing 15 posts - 1 through 15 (of 31 total)

You must be logged in to reply to this topic.