WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[closed] No Twitter cards on home page (16 posts)

  1. cyChop
    Member
    Posted 1 year ago #

    WordPress version: 3.5.1
    WordPress SEO version: 1.3.4.4

    I did this:
    Activate Twitter Cards

    I expected the plugin to do this:
    Add Twitter Cards to all pages of the website

    Instead it did this:
    Did not add Twitter Cards to home page. Posts and pages are fine though.

    (website: http://blog.keyboardplaying.org/ )

  2. faoliveira
    Member
    Posted 1 year ago #

    In yours posts appears this metas:

    <meta name="twitter:title">
    <meta name="twitter:url">
    <meta name='twitter:image'>

    In my posts doesn't have http://wordpress.org/support/topic/twitter-card?replies=2

  3. cyChop
    Member
    Posted 1 year ago #

    Actually they do appear in your posts. Here's an extract from view-source:http://huehue.com.br/2013/01/o-problema-da-nostalgia-exagerada/

    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@SiteHue">
    <meta name="twitter:creator" content="@Ivesaguiar">
    <meta name='twitter:image' content='http://huehue.com.br/wp-content/uploads/2013/01/gfs_56898_2_6-300x215.jpg'>
    <meta name="twitter:description" content="Se algo que incomoda que nem um mosquito em dia de calor, é a nostalgia.">

    You do not have them on home page either, though. It appears you and I have the same problem.

  4. Parneix
    Member
    Posted 1 year ago #

    Hi,

    What do you mean exactly when you write “no Twitter card” on home page? Do you expect to see something?

    As far as I understand “Twitter cards”, tow things worth knowing:

    1) You actually need to apply in order for Twitter to allow you to use “Twitter card”.

    2) No cards will be displayed on your site. All Yoast’s plugin does is implement the correct OpenGraph protocol and data for Twitter to be able to “read” your site (and/or posts) so it can display an enriched summary in tweets where said site and/or post are mentioned.

    Read about here.

    So yeah, what you see in the source code is actually Yoast’s plugin working: the correct data for the OpenGraph protocol were implemented. You can test it here. However, as I said, if you do not apply AND do not get Twitter green light to use Twitter cards, they will be no use for this.

    I hope it helps a bit,

    P.

  5. cyChop
    Member
    Posted 1 year ago #

    You are right, we must apply for Twitter cards to be found.

    We both look in source code for the appropriate meta tags, as faoliveira pointed out. When you look in source code of a post or page, the meta tags appear.

    However, on blog homepage, only the opengraph/facebook (<meta name="og:*" />) properties are set, nothing about the twitter cards (<meta name="twitter:*" />).

  6. Parneix
    Member
    Posted 1 year ago #

    Okay, yes, I can confirm this. But is Yoast’s plugin designed to implement them on the home page as well? That would be interesting to know: the answer will help decide if this is an “issue” or a “feature request”. Here, the developer only mentioned “posts & pages”. No word about homepage.

    P.

  7. cyChop
    Member
    Posted 1 year ago #

    Opengraph works on home page. The data to add in tags are the same (out very close). Maybe it is a feature request, I leave it open for the developer to decide.

  8. M Asif Rahman
    Member
    Posted 1 year ago #

    Surely does not work in home page. But I am seeing ts working for some sites.

  9. frev
    Member
    Posted 1 year ago #

    is the problem solve?

  10. cyChop
    Member
    Posted 1 year ago #

    Not for me, with latest version (1.4.1, WordPress 3.5.1).

  11. mAsT3RpEE
    Member
    Posted 1 year ago #

    Doesn't your home page need to be verified before other pages on your site can use twitter cards? If so then you will need twitter cards working on your home page to pass verification right?

    Take a good look at the code and you will see it has a few bugs in it (my plugin is the best = my foot). The plugins is supposed to add the info on the home page but a lot of home page code is broken because of recent upgrades. I don't understand why he stopped using "$options = get_wpseo_options()"? Be patient is my advice.

    When it's all working you can apply for the cards here:

    https://dev.twitter.com/docs/cards/validation/validator

    A quick solution is to add this to your head template:

    <?php if ( is_front_page() || is_home() ): ?>
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@SiteAccount">
    <meta name="twitter:creator" content="@CreatorAccount">
    <?php endif; ?>

    Another thing stick to 1.4.6. Only upgrade a plugin after a month has passed and bugs are removed unless it has a security update.

  12. M Asif Rahman
    Member
    Posted 1 year ago #

    There were some other limitation too. And lack of Photo Card and more control is also a down side.

    Thats why me and my team have to develop "Twitter Cards Meta", and adding feature regularly.

  13. mAsT3RpEE
    Member
    Posted 1 year ago #

    I know it's very very very wrong to mess with plugin code. Especially in a public forum. I hope no one gets angry at me for suggesting a hack of someone else's code but this is what I did to turn on twitter cards on my home page:

    /wp-content/plugins/wordpress-seo/frontend/class-twitter.php line 36

    CHANGE: if ( !is_singular() )

    TO: if ( !is_singular() && !is_front_page() && !is_home() )

    This is unofficial and should only be used in version 1.4.6 of the plugin. 1.4.7 removes descriptions from pages due to switch to using $this->options instead of $options = options = get_wpseo_options().

    That should solve your problems till .8 comes out.

    I hear he no longer monitors these pages so I think I should be safe. That's a real pity. These forums would provide more help to make a better plugin than hosting your own help desk. On top of that you can receive input from other plugin developers. You can't do that if you host your own help desk. I think he has become to over confident in his plugin. Without auto keyword generation this plugins is just waiting to be overcome by another.

    Why Yoast! Why!

  14. Angela Steph
    Member
    Posted 1 year ago #

    I am having the same issue. Twitter Cards working on posts, but not on Homepage and category pages (http://www.telltalesonline.com). I am sure it was working before the latest update.

    So the plan is to wait for a fix then apply for Twitter Cards? I assumed as well that having the Twitter cards meant all was good!

  15. Tom
    Member
    Posted 1 year ago #

    I'm experiencing the same issue.

    I am working on two different sites, both running WordPress v3.5.2 and Yoast SEO v1.4.13.

    On one site the Twitter Cards meta tags are appearing as expected - on the homepage and individual posts.

    On another the meta tags are only appearing on individual posts and not on the homepage...

  16. jrf
    Member
    Posted 1 year ago #

    I had a quick look at the code. Looks like it is by design that Twitter cards are not added to anything but posts and pages (determined by is_singular() ).
    So if your homepage is a page, it should display. If it's a default recent blog posts overview, it shouldn't (at this time).

    I suggest someone opens a feature request on GitHub for this to change, if there isn't one there yet.
    Would be useful if the feature request included some ideas on what to put in the homepage twitter card, as the title, description, image etc would all be ambiguous or unknown.
    Which I presume is why it's not implemented at the moment.

    Hope this helps!

    Smile,
    Juliette

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags