Add this to your theme’s functions.php
file to get rid of those pesky media-credit
shortcodes:
<?php function ignore_media_credit_shortcode( $atts, $content = null ) { return $content; } global $shortcode_tags; if ( !array_key_exists( 'media-credit', $shortcode_tags ) ) add_shortcode('media-credit', 'ignore_media_credit_shortcode' ); ?>
Also, I’d really appreciate it if you gave us some feedback as to why you disabled the plugin and how it could have better suited your needs.
I’m so glad you asked; you certainly can! Just call <?php get_media_credit_html($post); ?>
with an attachment_id
(int
) or post object for an attachment to get the media credit, including a link to the author page. To echo the results, call <?php the_media_credit_html($post); ?>
.
You sure can. Just add the link attribute in the media-credit shortcode, found in HTML view for a post, or directly when adding an image. For example, if your post contains:
[[media-credit name="Artist" align="alignleft" width="300"]]<img src="http://www.mysite.com/files/2010/09/image.jpg" width="300" height="450" class="size-300 wp-image-2" />[/media-credit]
change it to:
[[media-credit name="Artist" link="http://www.artistwebsite.com" align="alignleft" width="300"]]<img src="http://www.mysite.com/files/2010/09/image.jpg" width="300" height="450" class="size-300 wp-image-2" />[/media-credit]
Note the link to http://www.artistwebsite.com
above.
Unfortunately, this is a known bug in JetPack that can only be fixed by Automattic. As a workaround, use a different plugin for posting to social networks. Alternatively, if you make sure that you haven’t got any images with credits within the first 55 words of your article, you should be fine, too.
Feel free to get in touch with us about anything you’d like us to add to this list by leaving a message in the WordPress.org support forums.