Plugin Author
pepe
(@pputzer)
Please have a look at the FAQ. As featured images are theme-specific, you have to do some PHP coding for this.
Thread Starter
anashu
(@anashu)
I’ve seen the FAQ but it does not tell me what code to add into the functions.php file. Please provide me with the code. I’ve already spent a lot of time trying to find this and I’m only contacting you because I was not able to find it. I appreaciate all or any help.
Plugin Author
pepe
(@pputzer)
Uh sorry, but I don’t know that theme so I cannot provide you with specific code. The function call for adding a media credit to a template is documented in the FAQ. Most likely the place to add it will not be functions.php
but rather a template like single.php
.
Thread Starter
anashu
(@anashu)
I’m not seeing this. The only function call I’m seeing on the FAQ (https://wordpress.org/plugins/media-credit/faq/) is listed below. Could you let me know if I’m going to an incorrect FAQ page or could you provide me with the function call onto this post?
<?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’ );
?>
Plugin Author
pepe
(@pputzer)
Yes, you are looking at the wrong question. To quote from the FAQ:
More generally, can I insert media credit information into my themes with a template tag, for instance on category pages?
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); ?>
.
Thread Starter
anashu
(@anashu)
Not resolved. Although I was able to get the credit on the post, I’m not able to get it underneath the feature photo. Where is the area (not theme related) where the image and single post is located?
Plugin Author
pepe
(@pputzer)
Respectfully, what you need is a consultant to adapt your theme (or child theme) to your wishes. That is beyond the scope of plugin support here.
Thread Starter
anashu
(@anashu)
This was not a theme specific question. I was asking where on the generic (out of the box) WordPress files are post related to the single post with the feature image. Not theme related. Thanks.
Plugin Author
pepe
(@pputzer)
You can find the WordPress template hierarchy here. However, there really is no such thing as a non-theme-related template.