在后台 栏目管理-自定义页面-增加自定义页面
输入:
页面名称():网站地图
文件名():…/…/sitemap.xml
页面内容(*):
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.xds.work</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.xds.work/xuandiaozixun/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/xuandiaozixun/xuandiaowangping/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/xuandiaogongzuo/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/xuandiaoyouwei/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/jingcaizhuanti/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/dongbuxuandiao/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/zhongbuxuandiao/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.xds.work/xibuxuandiao/</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
[e:loop={1,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={2,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={3,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={4,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={5,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={6,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={7,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={8,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={9,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={10,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={11,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={12,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={13,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={14,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={15,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={16,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={17,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={18,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={19,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={20,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={21,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={22,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={23,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={24,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={25,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={26,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={27,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={28,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={29,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={30,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={31,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
[e:loop={32,30000,3,1,'','newstime DESC'}]
<url>
<loc><?=$bqsr['titleurl']?></loc>
<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
[/e:loop]
</urlset>
请把网址www.xds.work改为自己的
前面几个是栏目调用,自行更改栏目绝对地址
下面的<loc><?=$bqsr['titleurl']?></loc>
如果网站没有用绝对地址,前面应该加上网址,为:
<loc>http://www.xds.work<?=$bqsr['titleurl']?></loc>
请根据实际自行修改。
然后在管理自定义页面点刷新,sitemap的文件地址为:
http://www.xds.work/sitemap.xml
然后设置自动生成
系统-计划任务-管理刷新任务
增加刷新任务
任务类型:刷新自定义页面
任务名:刷新网站地图
执行时间间隔:建议设置为3600
选择页面:网站地图
最后是真正的自动生成,请安装插件:
https://blog.csdn.net/bobbsh/article/details/104205868
OK!