2018年5月
无插件实现sitemap XML版代码如下,新建xmlmap.php文件在wordpress根目录<?php require('./wp-blog-header.php'); header("Content-type: text/xml"); header('HTTP/1.1 200 OK'); $posts_to_show = 1000; // 获取文章数量 echo '<?xml version="1.0" encoding="UTF-8"?>'; echo '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'; ?> <...
无插件实现sitemap XML版

无插件实现sitemap XML版

HTML版代码如下,在模板页面新建sitemap.php文件,后台新建页面-模板选择为sitemap,然后固定链接可以设置为sitemap即可 演示地址https://www.uzioo.com/sitemap<?php /* Template Name: Sitemap */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" /> <title>站点...
无插件实现wordpress网站地图html版sitemap

无插件实现wordpress网站地图html版sitemap