900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > WordPress标题标签title的写法

WordPress标题标签title的写法

时间:2021-01-25 08:56:06

相关推荐

WordPress标题标签title的写法

WordPress最常用的标题标签是wp_title函数,所以在此之前,一定要好好了解函数。

用法一

主页:博客名 – 博客描述

主页翻页:博客名 -第 2 页

其它页面:页面名 – 博客名

其它页面:页面名 – 博客名-第 2 页

<?phpif(is_home() && !is_paged()){$title=get_bloginfo( ame). – .get_bloginfo(description);}else{$title=wp_title( - ,true, ight);bloginfo( ame);}if($paged

如果你想在主页上显示:博客名称 – 博客描述-第 2 页

只需要去除if语句中的&& !is_paged()

此外,我还摘录了官方默认主题twentyeleven标题写法:

<?php/** Print the <?php/** Print the<title>tag based on what is being viewed.*/global $page, $paged;wp_title( "-", true, "right" );// Add the blog name.bloginfo( "name" );// Add the blog description for the home/front page.$site_description = get_bloginfo( "description", "display" );if ( $site_description && ( is_home()</p><p></p></p> </div> <div class="keywords"> </div> <div class="tips">本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。</div> </div> <script>news_one();</script> <dl class="plbox" id="comments"> <dt>网友评论</dt> <dd> <textarea class="plcc">文明上网理性发言</textarea> <button class="sendpl">发表评论</button> <div class="pl_tips">网友评论仅供其表达个人看法,并不表明网站立场。</div> <div class="b10"></div> <ol class="pllist"> </ol> </dd> </dl> <script> $(".plcc").focus(function(){ if($('.plcc').val()=='文明上网理性发言') $('.plcc').val(''); }); $(".sendpl").click(function(){ var plcc=$('.plcc').val(),plcs=$('<p>'+plcc+'</p>').text(); if(plcs!='' && plcs!='文明上网理性发言'){ $('.pllist').prepend('<li><img src="https://900zi.500zi.com/statics/images/member/avatar.jpg" /><span class="adtime">2024-07-01 06:10</span><span class="plname">匿名316281291</span><span class="ipadd">[网友]<i>0.0.0.0</i></span><div class="pldata">'+plcs+' <font color="gray">(审核中)</font></div><div class="support"><span class="s1">顶0</span><span class="s2">踩0</span></div><div class="clear"></div></li>'); $.post("https://900zi.500zi.com/comment.php",{"commentid":"content_1-68101245-1","title":"WordPress%E6%A0%87%E9%A2%98%E6%A0%87%E7%AD%BEtitle%E7%9A%84%E5%86%99%E6%B3%95","content":plcs,"token":"0248efbd1291e7721b9c3d605eef9e07"}); } }); </script> <script>show(3);</script> <div class="list mt20"> <div class="listTit"><span></span>相关阅读</div> <dl> <dt><a href="https://900zi.500zi.com/art/14/550/9pjMwoX5N2.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/14/550/01bbc5fc7e04b92276056ee9ba7943c0.jpg" alt="织梦DedeCMS文章标题title属性显示font标签" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/art/14/550/9pjMwoX5N2.html" target="_blank">织梦DedeCMS文章标题title属性显示font标签</a></p> <p class="des"></p> <p class="key"> <span>2024-02-28</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/art/14/551/lL4kE5EQpP.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/14/551/632629ffa48f6b98f354b9165e8fce89.jpg" alt="织梦DedeCMS调用[field:title/]标签时 标题出现b标签怎么去掉" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/art/14/551/lL4kE5EQpP.html" target="_blank">织梦DedeCMS调用[field:title/]标签时 标题出现b标签怎么去掉</a></p> <p class="des"></p> <p class="key"> <span>2020-02-18</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/art/14/550/GL6aYvdApE.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/14/550/12a90fa7d344b6de00c7790aff5def18.jpg" alt="织梦DedeCMS增加一个fulltitle标签 让你的title=显示完整标题" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/art/14/550/GL6aYvdApE.html" target="_blank">织梦DedeCMS增加一个fulltitle标签 让你的title=显示完整标题</a></p> <p class="des"></p> <p class="key"> <span>2023-07-30</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/art/15/908/8nvk3m19N3.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/15/908/bf411b34e65bb059af38238813f60211.jpg" alt="如何修改服务器标题 修改DEDECMS网页TITLE标签的方法" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/art/15/908/8nvk3m19N3.html" target="_blank">如何修改服务器标题 修改DEDECMS网页TITLE标签的方法</a></p> <p class="des"></p> <p class="key"> <span>2022-09-15</span> <span></span> </p> </dd> </dl> </div> </div> <div class="sideRight"> <script>news_two();</script> <div class="rightNews mt20"> <div class="rightTit"><span></span>扩展阅读</div> <div class="rightNewsList"> <dl> <dt><a href="https://www.sgushi.com/g/2020/05/14/364768.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/pic/326.jpg" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://www.sgushi.com/g/2020/05/14/364768.html" target="_blank">End <em>Title</em></a></p> </dd> </dl> <dl> <dt><a href="https://www.sgushi.com/g/2020/06/08/647846.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/pic/86.jpg" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://www.sgushi.com/g/2020/06/08/647846.html" target="_blank">End <em>Title</em></a></p> </dd> </dl> <dl> <dt><a href="https://www.sgushi.com/g/2020/06/08/648028.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/pic/106.jpg" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://www.sgushi.com/g/2020/06/08/648028.html" target="_blank">End <em>Title</em></a></p> </dd> </dl> <dl> <dt><a href="https://www.sgushi.com/g/2020/06/28/868287.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/pic/395.jpg" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://www.sgushi.com/g/2020/06/28/868287.html" target="_blank">End <em>Title</em></a></p> </dd> </dl> <dl> <dt><a href="https://www.sgushi.com/g/2020/07/01/899205.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/pic/601.jpg" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://www.sgushi.com/g/2020/07/01/899205.html" target="_blank">End <em>Title</em></a></p> </dd> </dl> <dl> <dt><a href="https://www.sgushi.com/g/2020/07/01/899363.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/pic/104.jpg" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://www.sgushi.com/g/2020/07/01/899363.html" target="_blank">End <em>Title</em></a></p> </dd> </dl> </div> </div> <div class="rightNews mt20"> <div class="rightTit"><span></span>最近发布</div> <div class="rightNewsList"> <dl> <dt><a href="https://900zi.500zi.com/html/2024/0630/Y8nrzyZnMz.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/2024/06/30/4f97bb918e97b229625a255dc9fae75a.jpg" alt="共享的世界作文 900字" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/html/2024/0630/Y8nrzyZnMz.html" target="_blank">共享的世界作文 900字</a></p> <p class="key"> <span>2024-06-30</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/html/2024/0630/5lp5kZ1nOD.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/2024/06/30/2343b23787e50ade46527ebf8556e660.jpg" alt="愿你笑靥如花作文 900字" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/html/2024/0630/5lp5kZ1nOD.html" target="_blank">愿你笑靥如花作文 900字</a></p> <p class="key"> <span>2024-06-30</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/html/2024/0630/4onDeyrNm0.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/2024/06/30/17956ff594d193f3cb0f6081aec72f65.jpg" alt="心中的浪漫:沙滩上的思念(900字作文)" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/html/2024/0630/4onDeyrNm0.html" target="_blank">心中的浪漫:沙滩上的思念(900字作文)</a></p> <p class="key"> <span>2024-06-30</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/html/2024/0630/xXLXoMZpre.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/2024/06/30/26dba200e866425f7ed4a155dc8260a4.jpg" alt="六年级英语作文:My parents900字作文" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/html/2024/0630/xXLXoMZpre.html" target="_blank">六年级英语作文:My parents900字作文</a></p> <p class="key"> <span>2024-06-30</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/html/2024/0630/14L1j9onaG.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/2024/06/30/909bd3274b7d90d9f231cd1f6b687fd6.jpg" alt="疫情当下广播稿 900字" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/html/2024/0630/14L1j9onaG.html" target="_blank">疫情当下广播稿 900字</a></p> <p class="key"> <span>2024-06-30</span> <span></span> </p> </dd> </dl> <dl> <dt><a href="https://900zi.500zi.com/html/2024/0630/abpABMALrM.html" target="_blank"><img src="https://900zi.500zi.com/uploadfile/img/2024/06/30/f6f819ed6f799573d44759d66dc60067.jpg" alt="美丽的春天 900字儿" width="230" height="150" /></a></dt> <dd> <p class="tit"><a href="https://900zi.500zi.com/html/2024/0630/abpABMALrM.html" target="_blank">美丽的春天 900字儿</a></p> <p class="key"> <span>2024-06-30</span> <span></span> </p> </dd> </dl> </div> </div> <div class="rightClass mt20"> <div class="rightTit"><span></span>推荐专题</div> <div class="txt"> <a href="https://900zi.500zi.com/zhuanti/1/0/wdmqzw900z.html" title="我的母亲作文900字">我的母亲作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/zjsw900z.html" title="这就是我900字">这就是我900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/qtdzw900z.html" title="秋天的作文900字">秋天的作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/lwzw900z.html" title="礼物作文900字">礼物作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/jxrj900z.html" title="军训日记900字">军训日记900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/ydhzw900z.html" title="运动会作文900字">运动会作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/fljsdhg900z.html" title="傅雷家书读后感900字">傅雷家书读后感900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/yjnwdszw900z.html" title="一件难忘的事作文900字">一件难忘的事作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/xszw900z.html" title="叙事作文900字">叙事作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/kzxzdhzw900z.html" title="开在心中的花作文900字">开在心中的花作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/dzwz900z.html" title="打字文章900字">打字文章900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/900zjxw.html" title="900字记叙文">900字记叙文</a> <a href="https://900zi.500zi.com/zhuanti/1/0/zw900z.html" title="作文900字">作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/rj900z.html" title="日记900字">日记900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/jxw900z.html" title="记叙文900字">记叙文900字</a> </div> </div> </div> </div> <script>show(4);</script> <div class="footer"> <div class="footLinks"> <div class="footLink"> <div class="tit">猜你喜欢:</div> <div class="txt txtTwo"> <a href="https://900zi.500zi.com/zhuanti/1/0/yjg900z.html" title="演讲稿900字">演讲稿900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/wdmm900zzw.html" title="我的妈妈900字作文">我的妈妈900字作文</a> <a href="https://900zi.500zi.com/zhuanti/1/0/zj900zgzzw.html" title="周记900字高中作文">周记900字高中作文</a> <a href="https://900zi.500zi.com/zhuanti/1/0/xrdzw900z.html" title="写人的作文900字">写人的作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/xzdygzw900z.html" title="心中的阳光作文900字">心中的阳光作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/nykwcdl900z.html" title="那一刻 我长大了900字">那一刻 我长大了900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/dzwz900z.html" title="打字文章900字">打字文章900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/wdsjsh900z.html" title="我的暑假生活900字">我的暑假生活900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/yjzw900z591.html" title="游记作文900字">游记作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/qtzw900z.html" title="秋天作文900字">秋天作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/jxrj900z.html" title="军训日记900字">军训日记900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/gkzw900z.html" title="高考作文900字">高考作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/lswxdns900z.html" title="老师我想对你说900字">老师我想对你说900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/wdlszw900z.html" title="我的老师作文900字">我的老师作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/wdpyzw900z.html" title="我的朋友作文900字">我的朋友作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/gzjxw900z.html" title="高中记叙文900字">高中记叙文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/dhg900z.html" title="读后感900字">读后感900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/gzzw900z.html" title="高中作文900字">高中作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/jxgx900z.html" title="军训感想900字">军训感想900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/mazw900z.html" title="母爱作文900字">母爱作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/yjnwdszw900z.html" title="一件难忘的事作文900字">一件难忘的事作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/xlsdzw900z.html" title="写老师的作文900字">写老师的作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/jxxdth900z.html" title="军训心得体会900字">军训心得体会900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/xjzw900z.html" title="写景作文900字">写景作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/dhg900zzy.html" title="读后感900字左右">读后感900字左右</a> <a href="https://900zi.500zi.com/zhuanti/1/0/sjqszw900z.html" title="暑假趣事作文900字">暑假趣事作文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/xjsw900z.html" title="写景散文900字">写景散文900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/zj900z.html" title="周记900字">周记900字</a> <a href="https://900zi.500zi.com/zhuanti/1/0/zwdq900zzy.html" title="作文大全900字左右">作文大全900字左右</a> <a href="https://900zi.500zi.com/zhuanti/1/0/mw900z.html" title="美文900字">美文900字</a> </div> <div class="more">展开</div> </div> </div> <div class="copyRight pc"> <p class="left">900字范文 免责声明<span></span>© 2024 All Rights Reserved.</p> <p class="right"><a href="http://beian.miit.gov.cn/" target="_blank" rel="external nofollow">湘ICP备2024057051号</a><span></span><a href="/sitemap.html" target="_blank">网站地图</a><span></span><a href="/sitemap.xml" target="_blank">XML</a><span></span></p> </div> <div class="copyRight mobile"> <p>© 2024 All Rights Reserved.</p> <p><a href="/">900字范文</a> 免责声明<span></span></p> </div> </div> <div id="backTop" class="none"></div> <script type="text/javascript">op('content',68101245,1);</script> </body> </html>