2013-05-16 61 views

回答

1

如果從一個域到另一個transfering你的WordPress網站,這是要走的路:

http://codex.wordpress.org/Moving_WordPress

幾乎所有的時間提綱線做的伎倆:

//FIXME: do comment/remove these hack lines. (once the database is updated) 
update_option('siteurl', 'http://your.domain.name/the/path'); 
update_option('home', 'http://your.domain.name/the/path'); 

當然,你也需要改變自己的帖子和/或模板文件內的每個靜態鏈接。

這裏是一個鏈接,可以幫助內容替換鏈接:把這個代碼上的header.php 傳中

http://lorelle.wordpress.com/2005/12/01/search-and-replace-in-wordpress-mysql-database/

0

「get_the_ID(1)」 後(簡單後)ID 。 設置重定向網址。

<?php if (get_the_ID(1)) { ?> 
    <script type="text/javascript"> 
     window.location = "http://www.google.com"; 
    </script> 
<?php } ?> 
+0

謝謝。它做到了。 如果我想將使用costum帖子類型的wordress域重定向到不使用costum帖子類型的新域名,該怎麼辦。我的意思是domain1.com/article/post-name到domain2.com/post-name? –

相關問題