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 16, 2017 at 1:45 am #14119
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.
January 16, 2017 at 5:23 am #14124Suman M.Post count: 12478Hi, 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?
January 16, 2017 at 5:42 am #14125I 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
January 16, 2017 at 5:49 am #14127Suman M.Post count: 12478You 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.
January 16, 2017 at 7:34 am #14128I 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.
January 16, 2017 at 8:38 am #14129Suman M.Post count: 12478Can you please generate debug report from HMWP start tab and post it here as private reply?
January 16, 2017 at 9:49 am #14132This reply has been marked as private.January 16, 2017 at 5:37 pm #14136Suman M.Post count: 12478Please 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/January 16, 2017 at 6:32 pm #14137This reply has been marked as private.January 17, 2017 at 5:58 am #14149Suman M.Post count: 12478It 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.
January 18, 2017 at 9:06 pm #14177Any updates ?
January 21, 2017 at 4:21 pm #14220Any solutions ? !!!!
January 24, 2017 at 10:49 pm #14267Its now 7 days … and still no answer !!!!
January 25, 2017 at 6:52 am #14270Suman M.Post count: 12478Hi, sorry for the delay. The sr. support has been quite busy recently. I have reminded him again.
January 26, 2017 at 10:21 am #14280HassanPost count: 955Sorry 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 usingrequire('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.
-
AuthorPosts
You must be logged in to reply to this topic.