• Resolved mica123

    (@mica123)


    I very much apologize for asking another question regarding the site title. I was not sure if I should post the question in my previous topic on this subject. To be on the safe side I am opening a new topic.
    I modified the formats as follows:
    Page Title format: %page_title% | Tips and Tricks
    Post Title format: %post_title% | Tips and Tricks

    Tips and Tricks is not the title of my site.

    The result is that they appear on Google in the following format:
    %page_title% | Tips and Tricks – %blog_title%
    Post Title format: %post_title% | Tips and Tricks – %blog_title%

    I don’t mind having %blog_title% at the end, but I am puzzled about the hyphen “-“. Where did it come from? I’d rather have it replaced with “|” to keep it consistent.

    I hope you can advise?

    https://www.ads-software.com/plugins/all-in-one-seo-pack/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support Steve M

    (@wpsmort)

    Hi mica123,

    If you have %page_title% | Tips and Tricks entered in the Page Title field in All in One SEO Pack then that’s what All in One will use for the title. Check your source code and make sure.

    If the source code of a page doesn’t match that format then it’s possible something else is using output buffering and overwriting titles or it’s possible that the wp_title() tag in your theme’s header.php is wrong.

    Thread Starter mica123

    (@mica123)

    Thank you so much for getting back to me.
    I checked everything – the SEO Pack is set up correctly, but I found the following information:

    Changelog.txt:
    Functions to check whether or not All in One SEO and WordPress
    SEO are activated.
    In: /includes/functions.php and header.php
    for WP SEO.
    If AIOSEOP, we will remove the Responsive’s wp_title
    filter.
    And use wp_title() only for WP SEO.
    Pretty nice stuff.

    header.php:
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

    functions.php
    if ( !function_exists( ‘responsive_wp_title’ ) && !defined( ‘AIOSEOP_VERSION’ ) ) :

    function responsive_wp_title( $title, $sep ) {
    global $page, $paged;

    if ( is_feed() ) {
    return $title;
    }

    // Add the site name.
    $title .= get_bloginfo( ‘name’ );

    // Add the site description for the home/front page.
    $site_description = get_bloginfo( ‘description’, ‘display’ );
    if ( $site_description && ( is_home() || is_front_page() ) ) {
    $title .= ” $sep $site_description”;
    }

    // Add a page number if necessary.
    if ( $paged >= 2 || $page >= 2 ) {
    $title .= ” $sep ” . sprintf( __( ‘Page %s’, ‘responsive’ ), max( $paged, $page ) );
    }

    return $title;
    }

    add_filter( ‘wp_title’, ‘responsive_wp_title’, 10, 2 );

    Is this the cause? Is there something wrong with it?
    I wouldn’t mind keeping the site title at the end of the AIOSEOP, but I would prefer to replace the hyphen with “|” if possible.
    Obviously, I hope that this code does not have a negative impact on Google searches.

    Many thanks.

    Plugin Support Steve M

    (@wpsmort)

    That looks like it will have an effect on the title. I’d recommend contacting whoever created that theme and see if they can explain how to change the hyphen.

    Thread Starter mica123

    (@mica123)

    Many thanks. I’ll try, but I am very doubtful that they will offer any help as they have become very business-orientated. It used to be a very nice, extremely helpful company, but not any more.
    Many thanks for your help!

    Plugin Support Steve M

    (@wpsmort)

    Which theme are you using?

    Thread Starter mica123

    (@mica123)

    Actually, I made a little mistake relating the header code to you – the theme has the following code:
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

    So, would it be safe to replace it with:
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

    Many thanks.

    Thread Starter mica123

    (@mica123)

    Sorry, I duplicated the codes – here is another attempt:
    the theme has this code:
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

    So, would it be safe to replace it with:
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

    Plugin Support Steve M

    (@wpsmort)

    We typically use this –

    <title><?php wp_title(); ?></title>

    but the code you have should also work.

    Thread Starter mica123

    (@mica123)

    Well it seems that this is the correct code
    <title><?php wp_title( '|', true, 'right' ); ?></title>

    It would seem that it is actually the came code for
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

    I am using the Responsive theme.

    Thread Starter mica123

    (@mica123)

    The code is actually in the theme’s source code in functions.php, but evidently it is not working. Sorry for the many duplications of the same code, I tried to reproduce it exactly as it is in the source code (with | which represents the vertical bar) using the backticks, but it always came out the same way.

    Anyway, what is I used this format in AIOSEOP as follows:
    Page Title format: %page_title% | Tips and Tricks | %blog_title%
    Post Title format: %post_title% | Tips and Tricks| %blog_title%

    Would that work? Also, is there a way for me to try it out beforehand?

    Many thanks.

    Plugin Support Steve M

    (@wpsmort)

    Hi mica123,

    The title and description should be in the header.php file in your theme, not in the functions.php.

    This is what I have in the header.php of Responsive on my site –

    <span class=”site-description”><?php bloginfo( ‘description’ ); ?></span>

    You would change that from <span? to <h2>

    Thread Starter mica123

    (@mica123)

    Hello wpsmort,

    Thank you very much for getting back to me.
    Yes, I found this code in the header.php as well. But isn’t this for the site description rather than the actual site name – which in AIOSEOP terms is what %blog_title% means?

    I was actually wondering if changing the code
    title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>
    to
    title><?php wp_title( ‘|’, true, ‘left’ ); ?></title>
    would mean changing the position of the vertical bar “|” to the left.
    But that doesn’t explain where the hyphen comes from?

    Plugin Support Steve M

    (@wpsmort)

    Take a look at the Codex here – https://codex.www.ads-software.com/Function_Reference/wp_title

    This explains what each of those parameters does.

    Thread Starter mica123

    (@mica123)

    Thank you very much for your patience.
    I must apologize for replying too quickly in my previous post. I realized only belatedly that I confused the wp_title with the site name (which is %blog_title%).

    I am very much afraid that I am rather puzzled by
    <span class=”site-description”><?php bloginfo( ‘description’ ); ?></span>

    If I understand you correctly, the span tags <span> and </span> should be changed to <h2> and </h2> for better SEO? Is this related to the hyphen in any way?

    Also, I very much hope you won’t mind me asking again about this:
    am I wrong in thinking that this refers to the site description, not the site name? I thought that bloginfo( ‘name’) was for the site name?

    Thank you very much again for your patience with me.

    Plugin Support Steve M

    (@wpsmort)

    Hi mica123,

    I only provided the code for wrapping the description in an H2 because I believe you asked for that code. If you don’t want to do that then don’t use that code.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Another question re site title’ is closed to new replies.