'Using Wordpress Force Login plugin to have security feature for only a certain page. An error keeps popping up and i cant seem to find it
I can't see anything wrong with the code, this is the error below and this is the link to where i got it https://www.greengeeks.com/tutorials/force-login-before-visitors-access-wordpress/
Error:
Your PHP code changes were rolled back due to an error on line 15 of file wp-content/themes/flatsome/functions.php. Please fix and try saving again.
syntax error, unexpected 'mstyle' (T_STRING), expecting ']'
Code:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]
function my_forcelogin_redirect( $url ) {
return home_url( ‘/mypage/’ );
}
add_filter( ‘v_forcelogin_redirect’, ‘my_forcelogin_redirect’ );[/ht_message]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
