Home>

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

    Maybe

    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);

    Appendix

    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".

    Next,
    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"><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-303924.htm" target="_blank">php - coincheck api authentication doesn't work</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-69454.htm" target="_blank">php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-13156.htm" target="_blank">[php] i want to get account information using coincheck api</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-155329.htm" target="_blank">python - you may need to restart the kernel to use updated packages error</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-93496.htm" target="_blank">python 3x - typeerror: 'method' object is not subscriptable</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-302693.htm" target="_blank">the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-90750.htm" target="_blank">javascript - how to check if an element exists in puppeteer</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-50483.htm" target="_blank">xcode - pod install [!] no `podfile 'found in the project directory</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-135624.htm" target="_blank">vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning</a></li><li class="topic_card"><a class="side-theme-tab" href="https://www.tutorialfor.com/questions-62364.htm" target="_blank">android studio - unresolved reference comes out in kotlin</a></li></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>