WordPress.org

Ready to get started?Download WordPress

Forums

JM Twitter Cards
[resolved] Summary not showing image from post (5 posts)

  1. Rezaei
    Member
    Posted 1 year ago #

    Hi,

    I'm currently using Thesis 1.8 and when you create a post there is a box underneath the editing section for you to enter the url of the 'post image'.

    Thesis then displays that image as the main image of your blog post. It automatically crops it for the thumbnail as well.

    When I've set up JM Twitter Cards with the summary card it's not using the image from the blog post. Instead it is defaulting to my Gravatar image as I've set that as a back up.

    Is there any way I can get it to display the image from my post with out changing my current set up. Thesis handles the imaging for me.

    http://wordpress.org/extend/plugins/jm-twitter-cards/

  2. jmlapam
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, sure but you have to modify the PHP code. Can you do such a thing?

  3. Rezaei
    Member
    Posted 1 year ago #

    Yeah, I'm by no means an expert, but I'm pretty sure I'd be able to edit it.

    What do I have to edit exactly?

  4. jmlapam
    Member
    Plugin Author

    Posted 1 year ago #

    This would be pretty simple if you know how to get thesis post thumbnail URL.

    You just need this data (probably a post meta or a custom field) and then you'll be able to change L 245 in JM Twitter Cards like this :

    elseif( $cardType == 'gallery') {

    We are to add another elseif :

    elseif( $thesisImage  /* == something that retrieves thesis image URL*/ ) {
    echo '<meta property="twitter:image" content="' . $thesisImage . '"/>'."\n";
  5. jmlapam
    Member
    Plugin Author

    Posted 11 months ago #

    3.2.9 allows to associate custom fields with twitter meta.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.