Wordpress Homepage Redirect Question

Status
Not open for further replies.

-Matt-

Chronic Crypto
Mar 17, 2008
3,436
70
0
Quick question: does anyone know of a quick way to to redirect the hompage of a site powered by WP 2.5 to another site?

I don't mess much with WP and don't want to screw up the .htacess file or the index.php file unless it's not going to screw up the rest of the site.

WordPress › Redirection « WordPress Plugins < that plugin doesn't seem to want to work with my wp 2.5.1 install...
 


I'd just rename the index.php to 'index.php-BACKUP' or something, and create a new index.php that only contains redirect code.
 
  • Like
Reactions: -Matt-
Depending on your theme, there should be some code in the header file that does certain things only if it is the home page. Look for some code like this:
Code:
    <?php if((is_home() && ($paged < 2 )) || is_single() || is_page()){
    echo '<meta name="robots" content="index,follow" />';
    }
and change it to
Code:
    <?php if( is_home() ){
    echo '<PUT A META REFRESH HERE/>';
    }
 
  • Like
Reactions: -Matt-
Depending on your theme, there should be some code in the header file that does certain things only if it is the home page. Look for some code like this:
Code:
    <?php if((is_home() && ($paged < 2 )) || is_single() || is_page()){
    echo '<meta name="robots" content="index,follow" />';
    }
and change it to
Code:
    <?php if( is_home() ){
    echo '<PUT A META REFRESH HERE/>';
    }

Perfect, I went with that and it does just what I wanted.

+rep to you and Phil for answering.
 
Status
Not open for further replies.