Currently creating a web page with Wordpress.
The title is entered as "XXXXX" in the general settings, and the tagline is empty.

Currently, when you look inside the browser tab of Chrome etc., it becomes "XXXXX |" and the vertical bar cannot be taken.
I didn't include all in one SEO, so I thought it would be enough to change the general settings. Is there anything else I need to do?

It can be a useful site, so please let me know the appropriate method.

  • Answer # 1

    wp-content/themes/Your theme name/header.php

    <!-There are various things here->

    Remove "|" from
    If not, please tell me along with the theme name.

    Please copy and paste the following at the bottom of functions.php.

    function custom_title_sep ($sep) {
      $sep = '';
      return $sep;
    add_filter ('document_title_separator', 'custom_title_sep');

  • Answer # 2

    If the title tag is directly written as asuchi0819 says,

    If the old theme seems to have been output with wp_title (), delete the pipe as shown below

    <? php wp_title ('|', true, 'right');?><? php bloginfo ('name');?><? php wp_title ('', true, 'right');?><? php bloginfo ('name');?>

  • Answer # 3


    add_theme_support ('title-tag');

    This is the type of theme that will be used in the title, or basic after WP4.4

    This delimiter is filtered and defaults to '-'
    If '|' appears, it should already be filtered
    Priority with overriding priority

    add_filter ('document_title_separator', function () {return '';}, 100);


    add_theme_support ('title-tag'); If document_title_separator doesn't work
    You may have created your own title with pre_get_document_title

    In this case, the title structure depends on the theme
    How do you find the pre_get_document_title filter in the theme?

  • Answer # 4

    It's not a fundamental code clarification, but if you use the Lightning theme,

    It can be changed from the plug-in of "VK All in One Expansion Unit" recommended to install at the same time.

    First, from the "VK All in One Expansion Unit" menu
    Check the "Rewrite title tag" checkbox in "ExUnit".

    If you select "Top Pagetag" from "Main Settings" and save your favorite text in the input form, you can make the title without "|".</p> <p>Or, if UxUnit is checked,<br /> The other way of dealing with the description in function.php may work.</p> </div> </li> </ul> </div> </div> <div class="likeartlist"> <h3>Related articles</h3><ul><li class="liketitle"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-293395.htm" target="_blank">php - i want to convert my name to wordpress</a></li><li class="liketitle"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-142286.htm" target="_blank">javascript - [urgent] wordpress tab menu</a></li></ul></div> </div> <!----> <!--endpost--> </div> <!-- right --> <div class="rgt" id="recoTopicNode"> <div class="rgtse topic_aside"> <div class="side-tit">Trends</div> <ul class="side-theme-lst"></ul></div> </div> </div> </div> <div class="cla"></div> <script type="text/javascript" src="/js/prettify.js"></script> <script type="text/javascript"> (function() { if((".artleft pre").length > 0){ $(".artleft pre").addClass('prettyprint linenums'); prettyPrint(); }; $(".artleft p > code").each(function() { if ($(this).text().length >= 30) { $(this).addClass('linecode'); }else{} }); })(); </script> </main> </div> <footer id="footer" class="bx1"> <div class="col"> © 2019 <a href="https://www.tutorialfor.com/">Programming tutorial for beginners</a> </div> </footer> <div id="mask"></div> </body> </html>