WordPress.org

Ready to get started?Download WordPress

Forums

How to remove blog titles from page titles (5 posts)

  1. juneberry
    Member
    Posted 1 year ago #

    I have a wordpress site. I review beauty products. In order to change the web title I made some changes in the header php title
    { wp_title(); } ?>- Beauty products Reviews, Healthy Tips </title>

    Each time I post an article, on the browser I get my article heading along with my wp title typed in header.php file. For instance if my article headline is "Top 5 hair products" on the browser it shows my websitename, Top 5 hair products, Beauty products Reviews, Healthy Tips

    How do I removed my web title from single posts? I only want the title of the articles to appear on each posts on the browser.

    Please send me the php code and let me know which php folder ( main index, header, page template, single post?

    Thank you very much in advance

    JB

  2. luckdragon
    Member
    Posted 1 year ago #

    answered, then realized all of what you wanted, give me a min to work it out.

  3. luckdragon
    Member
    Posted 1 year ago #

    you didn't show all of your <title> tag, but I'm going to assume that's part of it.

    you can change it to say:

    <title>
    <?php
    if (!is_single()) {
      wp_title();
    } else {
      the_title();
    }
    ?>
    - Beauty products Reviews, Healthy Tips </title>
  4. juneberry
    Member
    Posted 1 year ago #

    <title><?php bloginfo('name'); if(is_home() || is_front_page()) { echo '-'; bloginfo('description'); } else { wp_title(); } ?> Beauty products Reviews, Healthy Tips</title>

    This is the whole code.

    How do I change the single post titles?

    Thank you very much
    JB

  5. juneberry
    Member
    Posted 1 year ago #

    The code you typed doesn't work. Showing syntax error, Can someone please help me?

    Thank you
    JB

Topic Closed

This topic has been closed to new replies.

About this Topic