Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #714708

    Craig D
    Participant

    How do we force summary_large_image when using the cornerstone social sharing element and twitter?

    #714745

    Thai
    Moderator

    Hi There,

    Try adding the following code under functions.php file locates in child theme:

    add_action( 'wp_head', 'x_summary_large_image' );
    function x_summary_large_image(){
      global $post;
      ?>
      <meta name="twitter:image" content="<?php echo get_the_post_thumbnail( $post->ID, 'full' ); ?>">
      <?php
    }

    Don’t forget to set the featured image for your posts / pages.

    For more information, you can take a look here: https://dev.twitter.com/cards/types/summary-large-image.

    Hope it helps 🙂

    #714762

    Craig D
    Participant

    Thanks 😉

    We don’t use a child of X at the moment, but I will give this a shot…

    Will you be adding this functionality in a future X/Cornerstone release?

    We also encountered another issue with updating Cornerstone, where we never get the updates…I’ll open a new ticket for this…

    Best,

    Craig

    #714906

    Craig D
    Participant

    We would like to expand this to include “meta: title and meta: description”
    <meta name=”twitter:title” content=”Jumble Launch”>
    <meta name=”twitter:description” content=”Secure Private Internet Connectivity!”>

    <meta name=”twitter:image” content=”<?php echo get_the_post_thumbnail( $post->ID, ‘full’ ); ?>”>

    Thanks again!

    Craig

    #715040

    Lely
    Moderator

    You’re welcome Craig!

    Thank you sharing your update.

    Always,
    X

    #715043

    Craig D
    Participant

    The code supplied did not work as expected – any other thoughts on this subject?

    Best

    Craig

    #715085

    Craig D
    Participant

    Here’s the tags Produced by add meta

    <meta name=”twitter:card” content=”summary_large_image” />
    <meta name=”twitter:site” content=”@EngineeredMagik” />
    <meta name=”twitter:title” content=”Jumble Launch” />
    <meta name=”twitter:description” content=”Get Secure Private Internet Connectivity Now!” />
    <meta name=”twitter:image:src” content=”https://XXXXXX.e-magik.XX/wp-content/uploads/2015/12/LAUNCH_V_2.jpg” />
    <meta name=”twitter:image:width” content=”784″ />
    <meta name=”twitter:image:height” content=”411″ />

    Facebook and LinkedIn work as expected only twitter seems to not work as expected

    Best.
    Craig

    #715105

    Craig D
    Participant

    Two screenshots tells the story…

    Best 🙂

    Craig

    #715214

    Lely
    Moderator

    Hello Craig,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Always,
    X

    #715403

    Craig D
    Participant
    This reply has been marked as private.
    #715412

    Rad
    Moderator

    Hi Craig,

    The screenshot only shows the preview of how your twitter card will be. But it doesn’t mean it will work right away. Your site/url’s card has to be approved first, and sometimes, it could take 2 weeks or 1 month. Twitter community may able to help you https://twittercommunity.com/c/cards

    Thanks!

    #715422

    Craig D
    Participant

    *.shop.e-magik.com is whitelisted for summary_large_image card

    INFO: Page fetched successfully
    INFO: 26 metatags were found
    INFO: twitter:card = summary_large_image tag found
    INFO: Card loaded successfully

    Ok can you fix this or?

    Best
    Craig

    #715432

    Craig D
    Participant

    Hi

    This is what you get from our site:https://twitter.com/intent/tweet?text=Timer&url=https%3A%2F%2Fshop.e-magik.com%2F

    You need to collect the following meta data in order to get the real card…

    <meta name=”twitter:card” content=”summary_large_image” />
    <meta name=”twitter:site” content=”@EngineeredMagik” />
    <meta name=”twitter:title” content=”Jumble Launch” />
    <meta name=”twitter:description” content=”Get Secure Private Internet Connectivity Now!” />
    <meta name=”twitter:image:src” content=”https://XXXXXX.e-magik.XX/wp-content/uploads/2015/12/LAUNCH_V_2.jpg” />
    <meta name=”twitter:image:width” content=”784″ />
    <meta name=”twitter:image:height” content=”411″ />

    Keep in mind that Facebook works as expected – this is because of Opengraph meta tags…

    Twitter’s own button works in the WP 2015 theme no problem…

    This needs a fix

    Best

    Craig

    #715452

    Craig D
    Participant

    https://dev.twitter.com/web/wordpress/cards

    You might want to study this…

    This is how twitter works…

    Best

    Craig 🙂

    #715457

    Craig D
    Participant

    Last but not least.

    The PHP code you recommended is causing the site to display “> in the top of the header on the page…So it’s not working…

    Best

    Craig 😉