So i have been trying deferent things of same code, and always retu an error:
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /home/tzjelenje/tz-jelenje.dreamhosters.com/wp-content/themes/colormag/functions.php on line 3
line 3
in this case is : function redirect_visitors() {
Code is :
add_action( 'init', 'redirect_visitors' )
function redirect_visitors() {
if ( ! is_user_logged_in() && is_front_page() ) {
wp_redirect( 'http://www.tz-jelenje.dreamhosters.com/readme.html', 301 );
exit; } }