Golden Eagle Home Page / Title Tags

Discussion in 'GoldenEagle WordPress Theme' started by jdprice63, Mar 8, 2015.

  1. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    Having a terrible time figuring out how the home page title meta tags work since it isn't really a "page" and the edits inside the theme options menu aren't working properly with Yoast / WP SEO. Have seen some similar user issues with it as well, so bringing mine to the table to see if there's a fix for mine and others.

    I've figured out a way to delete some of your function code for title / echo, but can't understand why the page is forcing a "-" before my site's title.

    Somehow it is forcing my title to be:
    <title>
    - Window Cleaning Kansas City Style | KC Window Cleaners</title>
    with the extra "-" for some reason. This is at: http://www.kcwindowcleaners.com

    The current method removes the duplication of my tag, which was even worse. So currently, inside the Theme Options section, I've set "title" field to "Window Cleaning Kansas City Style | KC Window Cleaners" and completely removed any text from "tagline" to keep it from duplicating anything.

    The other work-around is to write custom titles for every page on the site, since the site title/description tags seem to be throwing everything else off, not leaving any space after the page title, etc.

    Any idea why this leading dash would be showing up?

    Have WP SEO set to %%title%% %%page%% %%sep%% %%sitename%% for the home page wildcards, and tried hard coding, or removing this from functions.php as well:


    // Add the blog name.
    bloginfo('name');
    // Add the blog description for the home/front page.
    $site_description = get_bloginfo('description', 'display');
    if ($site_description && ( is_home() || is_front_page() ))
    echo "KC Window Cleaners";

    Thanks in advance.
     
  2. sameerwalkar

    sameerwalkar Guest

    Hi,
    If you are using any other WP SEO plugin than try removing below code from header.php:

    Code:
    <title>
    <?php
                /*
                * Print the <title> tag based on what is being viewed.
                */
                global $page, $paged;
                wp_title('|', true, 'right');
    // Add the blog name.
                bloginfo('name');
    // Add the blog description for the home/front page.
                $site_description = get_bloginfo('description', 'display');
                if ($site_description && ( is_home() || is_front_page() ))
                    echo " | $site_description";
    // Add a page number if necessary:
                if ($paged >= 2 || $page >= 2)
                    echo ' | ' . sprintf( PAGE_NO , max($paged, $page));
                ?></title>
    The reason is other plugins also have title tags in their coding so that causes title duplicacy.


    Thanks & Regards,
    Sameer Khanwalkar
     
  3. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    Thank you. The concern is that if that is removed, how do I edit the "home" page meta & title tags? Removing the above would remedy the problem with most of the site's page, but not the "Home" page.

    The page content for the home page is generated from the Golden Eagle theme's custom settings. So the home page doesn't have a "page" that can be edited like any other Wordpress Page in the Page Editor.

    Any suggestions?
     
  4. sameerwalkar

    sameerwalkar Guest

    Hi,

    I got your concern.

    Replace the previously given code with :

    Code:
    <?php if(is_home() || is_front_page()){
    ?>
     
    <title>
    <?php
                /*
                * Print the <title> tag based on what is being viewed.
                */
                global $page, $paged;
                wp_title('|', true, 'right');
    // Add the blog name.
                bloginfo('name');
    // Add the blog description for the home/front page.
                $site_description = get_bloginfo('description', 'display');
                if ($site_description && ( is_home() || is_front_page() ))
                    echo " | $site_description";
    // Add a page number if necessary:
                if ($paged >= 2 || $page >= 2)
                    echo ' | ' . sprintf( PAGE_NO , max($paged, $page));
                ?></title>
               
                <?php }  ?>
    Hope it will solve your query.

    Regards,
    Sameer
     
  5. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    this is very confusing.

    The first response said to delete the code outlined in the response.

    The second response said to replace the code that the first code said to delete.

    I am guessing you are suggesting that I replace a section of code with the new code, or to add this code to the existing code.

    Can you please explain so I can try to make this adjustment? I'm not clear on exactly what code is supposed to be placed where and if it is supplemental, or replacement code (and if replacement, which block of code it is supposed to replace).

    Also, I see a section where it states

    is_home()

    and

    is_front_page()

    Are those referencing the same thing, but it depends on the way I have my home page set in the theme customizer?

    If I need to alter the above code so it matches mine, I just want to use the proper code.

    Thanks
     
  6. sameerwalkar

    sameerwalkar Guest

    Hi,

    Yes you are right. I have suggested you to replace the code with the second block of code that I have provided, because it contains the "if " condition that states that: if its a home page or a front page ( is_home() and is_front_page() referencing the same thing) than set meta & title tags. Hope now your doubt gets resolved :).

    Also Its recommended that doing any custom changes to source code always create a backup.

    To create a backup of your theme install and activate WP EDITOR plugin.
    Now go to Dashboard->Appearance->Theme Editor

    and click on download theme button at bottom to download your current theme

    Now go to Dashboard->Tools where you will find Export website contents.

    So mentioned steps will help you to create a backup.

    Regards,
    Sameer
     
  7. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    thank you, I will try this out
     
  8. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    Still having some issues with this. Currently, the home page meta description changes every single time a blog post is done and the blog post meta description becomes the home page meta description.

    I really need to get this fixed. The meta description written in your theme customizer / seo settings doesn't alter the title tags either.
     
  9. sameerwalkar

    sameerwalkar Guest

    Hello,

    Please provide the following information listed below.
    This Thread Link:
    Your Website URL:
    WordPress Username:
    WordPress Password:
    Send this information on our email at [email protected]
     
  10. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    Sameer, I've sent all of the details to your support email address, appreciate your help with correcting this.
     
  11. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    Hi Sameer,

    I sent everything above to your support email address and they responded saying "everything is fine" which it is not. The back end version in your theme editor isn't working for altering this, I've tried removing everything so it looks like this and I'm not interested in asking that same question again.

    I think you can probably help me accomplish with a single response. I simply want to be able to edit the title tag on the home page that is generated by your theme settings panel, which isn't actually a "page" in Wordpress.

    As you can see here, there isn't a way to edit the title of your home page:
    https://goo.gl/qBQ5QX
    https://goo.gl/6iOSX5

    Furthermore, because we use WP SEO / Yoast, like 80-90% of WP users to try and generate a tag,the php isn't allowing it to function properly on the home page.

    My request is to simply show me where to manually add a title tag only for the home page through your previously provided PHP. I will then add this via php and see if it will work.

    Below is the PHP you provided in March of this year. Can you please edit the below PHP to show me where I should add my own dedicated line of text to manually add the title tag to the home page only via PHP?

    I have been trying for months to get this fixed and really just need to know where within your conditional statements below I would add a manual line of text that will serve as the meta title tag of the home page. Just use something like INSERT TITLE TAG TEXT HERE if you wouldn't mind.

    thank you

    <?php if(is_home() || is_front_page()){
    ?>

    <title>
    <?php
    /*
    * Print the <title> tag based on what is being viewed.
    */
    global $page, $paged;
    wp_title('|', true, 'right');
    // Add the blog name.
    bloginfo('name');
    // Add the blog description for the home/front page.
    $site_description = get_bloginfo('description', 'display');
    if ($site_description && ( is_home() || is_front_page() ))
    echo " | $site_description";
    // Add a page number if necessary:
    if ($paged >= 2 || $page >= 2)
    echo ' | ' . sprintf( PAGE_NO , max($paged, $page));
    ?></title>

    <?php } ?>
     
  12. jdprice63

    jdprice63 New Member

    Joined:
    Jan 12, 2015
    Messages:
    10
    Likes Received:
    0
    In the above, where I said "it looks like this" I was referring to the removal of any code that would potentially be generated by Yoast: https://goo.gl/iNzFx2 (screen capture)
     
  13. Sobhagya

    Sobhagya Guest

    Joined:
    May 29, 2015
    Messages:
    414
    Likes Received:
    6
    Hello,

    We have got your concern, Kindy check your site, we have done some modification in your header.php and inktheme-functions.php file,

    As you are using latest version of the WordPress there has been depreciation in some WordPress functions, Current version uses following method to call title tag for the theme..

    https://codex.wordpress.org/Title_Tag

    We just added it in your theme and seems everything fine,

    Kindly, check your title tags for home page and other pages...you will be now able to use desired SEO by Yoast title tags in your site..

    Let me know, if you need further help,
     

Share This Page