Forum Replies Created
-
AuthorPosts
-
September 15, 2020 at 4:07 pm in reply to: How to Load the WP eMember's Language File from Another Folder #78094duncaagnesMember
I have no idea why it is not working. Is there a workaround for this problem?
September 15, 2020 at 4:03 pm in reply to: How to Load the WP eMember's Language File from Another Folder #78093duncaagnesMemberIf I put the code in the hello.html, nothing happens, but if I create a .PHP file with the this code alone, ‘<?php echo getcwd(); ?>’ it provides the exect same result I’m using in “test.html” and “functions.php”:
/home/username/public_html/wp-content/plugins/wp-emember-child-lang
It seems,
September 15, 2020 at 7:59 am in reply to: How to Load the WP eMember's Language File from Another Folder #78091duncaagnesMemberThanks for the quick answer.
hello.html works (displays “Hello World’; ?>”)
test.html does not work (blank page appears)
On the other hand, I created a .php file with the following content, to get the absolute root from server:
<?php
echo $_SERVER[“DOCUMENT_ROOT”]
?>
The result was:
/home/username/public_html
The root path seems to be ok, but not working for some reason. Any ida, why? Or any other solution?
September 14, 2020 at 8:16 pm in reply to: How to Load the WP eMember's Language File from Another Folder #78089duncaagnesMemberMy storage provider uses Cpanel. As long as I know, absolute path in Cpanel always starts with /home/username/..
Cpanel has a built in editor for php files, that shows the path. I copied that and pasted in the code.
Is there a way to check if the path is correct?
September 13, 2020 at 4:16 pm in reply to: How to Load the WP eMember's Language File from Another Folder #78087duncaagnesMemberI’ve inserted the below code (real username is used in the code) into my Enfold-child themes functions.php, but the changes I make in the hun.php do not take affect.
If I change the hun.php in the original folder, changes appear immediately, so changes in hun.php should be ok. The functions.php language override code works for the theme itself, so the setup of the child theme should be also ok.
Please help! How can I make this work?
Inserted code:
add_filter(’emember_language_loading_override’, ‘load_my_custom_emember_language’);
function load_my_custom_emember_language()
{
$language_file = “/home/username/public_html/wp-content/plugins/wp-emember-child-lang/hun.php”;
include_once($language_file);
return “custom-file-loaded”;
}
-
AuthorPosts