wordpress建立php站点地图,wordpress自动网站地图
一、下載Yoast SEO插件
二、登錄寶塔界面
進入寶塔頁面之后,點擊——> 文件 ——> 新建 ——> 新建空白文件(名字為:template-sitemap.php)
把代碼粘貼至文件里面,然后保存
/p>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
站點地圖 - <?php bloginfo('name'); ?>body {
font-family: Verdana;
FONT-SIZE: 12px;
MARGIN: 0;
color: #000000;
background: #ffffff;
}
img {
border: 0;
}
li {
margin-top: 8px;
}
.page {
padding: 4px;
border-top: 1px #EEEEEE solid
}
.author {
background-color: #EEEEFF;
padding: 6px;
border-top: 1px #ddddee solid
}
#nav, #content, #footer {
padding: 8px;
border: 1px solid #EEEEEE;
clear: both;
width: 95%;
margin: auto;
margin-top: 10px;
}
<?php bloginfo('name'); ?>站點地圖
<?php bloginfo('name'); ?>
?
站點地圖
最新文章
$previous_month = $month = 0;
$ul_open = false;
$myposts = get_posts('numberposts=-1&orderby=post_date&order=DESC');
foreach ($myposts as $post) : ?>
target="_blank"><?php the_title(); ?>
分類目錄單頁面查看博客首頁: <?php bloginfo('name'); ?>Latest
Update: <?php $last = $wpdb->get_results("SELECT MAX(post_modified) AS MAX_m FROM $wpdb->posts WHERE (post_type = 'post' OR post_type = 'page') AND (post_status = 'publish' OR post_status = 'private')");
$last = date('Y-m-d G:i:s', strtotime($last[0]->MAX_m));
echo $last; ?>
? <?php echo date('Y'); ?>
style="cursor:help"><?php bloginfo('name'); ?>
版權所有.總結
以上是生活随笔為你收集整理的wordpress建立php站点地图,wordpress自动网站地图的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: fir滤波器应用matlab,fir滤波
- 下一篇: php计算机基础知识,计算机基础知识①