• Resolved ftwwings

    (@ftwwings)


    So i have been trying deferent things of same code, and always return 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; } }

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wp_redirect not working’ is closed to new replies.