如何在WordPress中為帖子標題添加字符數限制


您是否知道最佳標題長度在55到60個字符之間? 運行多作者博客時,很難管理標題長度。 在本文中,我們將向您展示如何在WordPress中為帖子標題添加字符數限制。

影片教學

訂閱WPBeginner

如果您不喜歡該視頻或需要更多說明,請繼續閱讀。

您需要做的第一件事是安裝並激活Limit Post Titles插件。 激活後,只需轉到 設置»限制帖子標題 配置插件設置。

WordPress中的標題限制設置

您需要輸入字符數限制,然後選擇要啟用此字符數限制的帖子類型。 接下來,點擊保存設置按鈕以保存您的設置。

現在,您可以創建一個新帖子並開始輸入帖子標題。 您會注意到該插件將顯示您的字符數限制,並在超出限制時通知您。

超過標題限制的通知

帖子標題和SEO標題之間的區別

如果您使用的是SEO插件,例如WordPress SEO或All in One SEO,那麼您會注意到,您可以為每個帖子添加SEO標題。

SEO標題與帖子標題

此SEO標題不會更改您帖子的標題。 而是將其用作HTML 帖子的標籤。 這使您可以為SEO提供替代的較短標題,為帖子標題提供更多描述性標題。 它們都提供了顯著的SEO提升。 但是,大多數網站所有者都對這兩種設置都使用相同的標題,以避免來自搜索引擎的關鍵字填充懲罰。 </p> <p>我們希望本文能幫助您為WordPress中的帖子標題添加字符限制。 您可能還需要查看有關如何防止WordPress中重複帖子標題的指南。</p> <p>如果您喜歡這篇文章,請訂閱我們的YouTube頻道WordPress視頻教程。 您也可以在找到我們 <a href="http://twitter.com/wpnull.xyz" title="WPBeginner on Twitter" target="_blank" rel="nofollow noopener">推特</a> 和Facebook。 </p> </div> <p><script async src="https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&gadget=a&no_expand=1&refresh=604800&url=https://platform.twitter.com/widgets.js" charset="utf-8"></script><br /> <br /></p> </div><!-- .entry-content --> <footer class="entry-footer default-max-width"> <div class="posted-by"><span class="posted-on">Published <time class="entry-date published updated" datetime="2021-01-07T20:43:53+00:00">January 7, 2021</time></span><span class="byline">By <a href="https://wpnull.xyz/author/admin" rel="author">總編輯團隊</a></span></div><div class="post-taxonomies"><span class="cat-links">Categorized as <a href="https://wpnull.xyz/category/news" rel="category tag">最新消息</a> </span></div> </footer><!-- .entry-footer --> </article><!-- #post-1361 --> <nav class="navigation post-navigation" role="navigation" aria-label="Posts"> <h2 class="screen-reader-text">Post navigation</h2> <div class="nav-links"><div class="nav-previous"><a href="https://wpnull.xyz/1360" rel="prev"><p class="meta-nav"><svg class="svg-icon" width="24" height="24" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 13v-2H8l4-4-1-2-7 7 7 7 1-2-4-4z" fill="currentColor"/></svg>Previous post</p><p class="post-title">如何為WordPress提出新功能建議</p></a></div><div class="nav-next"><a href="https://wpnull.xyz/1362" rel="next"><p class="meta-nav">Next post<svg class="svg-icon" width="24" height="24" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="m4 13v-2h12l-4-4 1-2 7 7-7 7-1-2 4-4z" fill="currentColor"/></svg></p><p class="post-title">如何在WordPress中添加私人消息系統</p></a></div></div> </nav> </main><!-- #main --> </div><!-- #primary --> </div><!-- #content --> <aside class="widget-area"> <section id="search-2" class="widget widget_search"><form role="search" method="get" class="search-form" action="https://wpnull.xyz/"> <label for="search-form-1">Search…</label> <input type="search" id="search-form-1" class="search-field" value="" name="s" /> <input type="submit" class="search-submit" value="Search" /> </form> </section> <section id="recent-posts-2" class="widget widget_recent_entries"> <h2 class="widget-title">最新消息</h2><nav role="navigation" aria-label="最新消息"> <ul> <li> <a href="https://wpnull.xyz/2378">WordPress Layout Terms Demystified (Quick Reference)</a> </li> <li> <a href="https://wpnull.xyz/2377">如何修復WordPress中的無效JSON錯誤(入門指南)</a> </li> <li> <a href="https://wpnull.xyz/2376">2021年8種最佳商務視頻聊天軟件(帶免費選項)</a> </li> <li> <a href="https://wpnull.xyz/2375">如何在WordPress中添加常見問題解答架構(3種方法)</a> </li> <li> <a href="https://wpnull.xyz/2374">如何在WordPress的生物頁面中建立鏈接(Linktree替代)</a> </li> <li> <a href="https://wpnull.xyz/2373">How to Speed Up Your eCommerce Website (14 Proven Tips)</a> </li> <li> <a href="https://wpnull.xyz/2372">如何在WooCommerce產品頁面上顯示受歡迎的產品(2種方式)</a> </li> <li> <a href="https://wpnull.xyz/2371">9個2021年適用於WordPress的9個最佳星級評級插件(已比較)</a> </li> <li> <a href="https://wpnull.xyz/2370">如何在WordPress中使用WebP圖像(3種方法)</a> </li> <li> <a href="https://wpnull.xyz/2369">如何創建具有不同域的WordPress多站點(4個步驟)</a> </li> <li> <a href="https://wpnull.xyz/2368">如何在WordPress中正確設置視頻SEO(逐步)</a> </li> <li> <a href="https://wpnull.xyz/2367">您應該使用的13個最佳WordPress多站點插件(專家選擇)</a> </li> </ul> </nav></section><section id="text-2" class="widget widget_text"><h2 class="widget-title">猜你喜歡</h2> <div class="textwidget"><p><span id="ipinfo" class="ipinfo"><script type="text/javascript" src="https://buzzdope.com/sitelink.php"></script></span></p> </div> </section> </aside><!-- .widget-area --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <div class="site-name"> <a href="https://wpnull.xyz/">WPNULL</a> </div><!-- .site-name --> <div class="powered-by"> Proudly powered by <a href="https://wordpress.org/">WordPress</a>. </div><!-- .powered-by --> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <script>document.body.classList.remove("no-js");</script><button id="dark-mode-toggler" class="fixed-bottom" aria-pressed="false" onClick="toggleDarkMode()">Dark Mode: <span aria-hidden="true"></span></button> <style> #dark-mode-toggler > span { margin-left: 5px; } #dark-mode-toggler > span::before { content: 'Off'; } #dark-mode-toggler[aria-pressed="true"] > span::before { content: 'On'; } </style> <script>function toggleDarkMode() { // jshint ignore:line var toggler = document.getElementById( 'dark-mode-toggler' ); if ( 'false' === toggler.getAttribute( 'aria-pressed' ) ) { toggler.setAttribute( 'aria-pressed', 'true' ); document.documentElement.classList.add( 'is-dark-theme' ); document.body.classList.add( 'is-dark-theme' ); window.localStorage.setItem( 'twentytwentyoneDarkMode', 'yes' ); } else { toggler.setAttribute( 'aria-pressed', 'false' ); document.documentElement.classList.remove( 'is-dark-theme' ); document.body.classList.remove( 'is-dark-theme' ); window.localStorage.setItem( 'twentytwentyoneDarkMode', 'no' ); } } function twentytwentyoneIsDarkMode() { var isDarkMode = window.matchMedia( '(prefers-color-scheme: dark)' ).matches; if ( 'yes' === window.localStorage.getItem( 'twentytwentyoneDarkMode' ) ) { isDarkMode = true; } else if ( 'no' === window.localStorage.getItem( 'twentytwentyoneDarkMode' ) ) { isDarkMode = false; } return isDarkMode; } function darkModeInitialLoad() { var toggler = document.getElementById( 'dark-mode-toggler' ), isDarkMode = twentytwentyoneIsDarkMode(); if ( isDarkMode ) { document.documentElement.classList.add( 'is-dark-theme' ); document.body.classList.add( 'is-dark-theme' ); } else { document.documentElement.classList.remove( 'is-dark-theme' ); document.body.classList.remove( 'is-dark-theme' ); } if ( toggler && isDarkMode ) { toggler.setAttribute( 'aria-pressed', 'true' ); } } function darkModeRepositionTogglerOnScroll() { var prevScroll = window.scrollY || document.documentElement.scrollTop, currentScroll, checkScroll = function() { currentScroll = window.scrollY || document.documentElement.scrollTop; if ( currentScroll + ( window.innerHeight * 1.5 ) > document.body.clientHeight || currentScroll < prevScroll ) { document.getElementById( 'dark-mode-toggler' ).classList.remove( 'hide' ); } else if ( currentScroll > prevScroll && 250 < currentScroll ) { document.getElementById( 'dark-mode-toggler' ).classList.add( 'hide' ); } prevScroll = currentScroll; }; window.addEventListener( 'scroll', checkScroll ); } darkModeInitialLoad(); darkModeRepositionTogglerOnScroll(); </script> <script> if ( -1 !== navigator.userAgent.indexOf( 'MSIE' ) || -1 !== navigator.appVersion.indexOf( 'Trident/' ) ) { document.body.classList.add( 'is-IE' ); } </script> <script id='twenty-twenty-one-ie11-polyfills-js-after'> ( Element.prototype.matches && Element.prototype.closest && window.NodeList && NodeList.prototype.forEach ) || document.write( '<script src="https://wpnull.xyz/wp-content/themes/twentytwentyone/assets/js/polyfills.js?ver=1.1"></scr' + 'ipt>' ); </script> <script src='https://wpnull.xyz/wp-content/themes/twentytwentyone/assets/js/responsive-embeds.js?ver=1.1' id='twenty-twenty-one-responsive-embeds-script-js'></script> <script src='https://wpnull.xyz/wp-includes/js/wp-embed.min.js?ver=5.6.4' id='wp-embed-js'></script> <script> /(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1); </script> </body> </html> <!-- Page generated by LiteSpeed Cache 3.6.2 on 2021-05-16 20:21:13 -->