• Resolved kmcminn

    (@kmcminn)


    Hmm, am I missing something in the documentation or plugin settings?

    Because the “Enter your Personal Twitter account” field is in the plugin settings, I’m under the assumption that the plugin doesn’t use PHP to dynamically fetch the author of the post.

    What if a site has multiple authors?

    http://ww.wp.xz.cn/plugins/jm-twitter-cards/

Viewing 15 replies - 1 through 15 (of 15 total)
  • I’ve got the same problem….

    I’ve found the solution….

    Go to the JM Twitter Card settings
    The first section is General, in this section you’ll find this:
    Add a field Twitter to profiles <<< select yes

    in the user profiles it will add a box Twitter Card Creator where you can insert a twitter handle (without the @ symbol)

    OR you if you already have twitter usernames in the user profiles you should replace the meta key jm_tc_twitter with your own meta key…

    Hope this helps 🙂

    Thread Starter kmcminn

    (@kmcminn)

    Thanks very much for the info, Cindy.

    I currently already have a field for authors to provide their Twitter handle, so it looks like I don’t need to enable the ‘Add a field Twitter to profiles” option from the M Twitter Card settings.

    I’m still confused on this, however:

    OR you if you already have twitter usernames in the user profiles you should replace the meta key jm_tc_twitter with your own meta key…

    Why exactly do I change that, and what does it do?

    Thanks again for you help.

    if you already have a twitter field in your users profiles then you probably use a theme that has added them or you’re using a plugin that has added the field. The theme or the plugin used a meta key to define the twitter field (and store it in the database).

    So say for example your theme uses this meta key to define the field: yourtheme_twitter.

    Then in the JM twittercards plugin settings, you would replace, in the General settings section, jm_tc_twitter with yourtheme_twitter. that way the plugin should be able to automatically retrieve your authors twitternames…

    Thread Starter kmcminn

    (@kmcminn)

    Ah, I see, Cindy. But where do I find my theme’s meta key?

    Which plugin or theme are you using?

    Thread Starter kmcminn

    (@kmcminn)

    I’m using the GreenChilli theme.

    okay I had a quick look and downloaded the theme files. From what I can tell right now:
    In the blogposts I can see there are author boxes which already display a link to twitter. So if you open your single.php file you will find

    <div class="postauthor">
                            <h4><?php _e('About Author', 'mythemeshop'); ?></h4>
    							<?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '85' );  } ?>
                                <h5><?php the_author_posts_link(); ?> | <a href="<?php echo  get_the_author_meta( 'user_url');?>">Website</a> | <a href="http://twitter.com/<?php echo get_the_author_meta( 'twitter');?>">Twitter</a></h5>
    							<p><?php the_author_meta('description') ?></p>
    						</div>

    To me it looks like the meta key is just the word ‘twitter’ as you can see in this line of code:
    php echo get_the_author_meta( 'twitter');?>

    Thread Starter kmcminn

    (@kmcminn)

    I see what you’re saying now. Makes sense, Cindy! I think!

    Like, if I added “twitter” for the meta key field in the JM Twitter Card settings, and publish an article, then look at the source, it should say:

    <meta name="twitter:creator" content="@k_mcminn"/>

    …and if that’s not the correct key, it won’t. Does that sound correct to you?

    yes that’s exactly what I mean. I quickly installed the theme on my test server and it does look like that’s the right meta key to use. So let me know if it works! If not I will have a closer look later 🙂

    Thread Starter kmcminn

    (@kmcminn)

    Hey, cool. Using “twitter” for the meta field key works and pulls whatever the current author has set in hos/her profile. Neat. Sorted! Thanks for all of your help, Cindy! Great job!

    Fabulous! Glad I could help and that you got it working 🙂

    Thread Starter kmcminn

    (@kmcminn)

    Thanks for going above and beyond. You’ve been a tremendous help! Can I keep in contact with you somehow?

    Hahaha it’s my pleasure, sure keep in touch. If you go to my website you can send me an email through the contact form.

    JustC Design

    Thread Starter kmcminn

    (@kmcminn)

    Excellent. Thanks again, Cindy!

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘twitter:creator’ is closed to new replies.