• Resolved samhudson444

    (@samhudson444)


    Hi,

    The credit for featured image is not showing. I was wondering how I can show it and get some help. It works for content but not the featured image. Cheers.

    I also only want the featured image to show the credit on the POST content and not pages.

    This one works in content:

    View post on imgur.com

    The featured image doesn’t work even after ticking the checkbox in settings:

    View post on imgur.com

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author pepe

    (@pputzer)

    HI @samhudson444! What theme are you using? The featured image credit feature only works if a theme uses the standard WordPress functions/filter hooks (i.e. post_thumbnail_html).

    Plugin Author pepe

    (@pputzer)

    @samhudson444 do you still need help with this?

    Thread Starter samhudson444

    (@samhudson444)

    Plugin Author pepe

    (@pputzer)

    So that is a non-free/premium theme, @samhudson444? In that case you’ll have to ask them for support, since I don’t have access to their code for testing or analysis. If they have any technical questions about Media Credit, I’ll gladly answer them, but how they display feature images (previously named “post thumbnails”, that’s the reason for the function/filter hook names) is solely under their control.

    Thread Starter samhudson444

    (@samhudson444)

    It is a premium theme but I contacted them and they said I’d need to get it inserted into the template code but I don’t know-how as they didn’t describe it. If I send you screenshots do you think you could help me?

    Plugin Author pepe

    (@pputzer)

    Hi @samhudson444, I can guide you to the API functions for accessing the credits, but I don’t know where you’d need to insert them as I don’t know their theme’s code.

    To output the credit for an attachment, you can use \Media_Credit::html( $attachment );. Note that $attachment can either be the attachment post object or its post ID – for displaying the post thubnail, you’d use the result of get_post_thumbnail_id().

    • This reply was modified 4 years, 6 months ago by pepe.
    Plugin Author pepe

    (@pputzer)

    @samhudson444 Have you been able to resolve the issue with your theme’s technical support?

    Thread Starter samhudson444

    (@samhudson444)

    Hiya, I’ve had no support from them, unfortunately, they seem to not really care about it – they even suggested this plugin to me but it doesn’t show. If I turn off the theme it does, I have my FTP access etc and I’m sure it’s like the simplest thing to implement but I’m not sure.

    Plugin Author pepe

    (@pputzer)

    @samhudson444 I’m sorry to hear that. Without being able to see their featured image/post thumbnail code, there is not much I can do ??

    If you do get them to react, I’ll gladly work with them to help you achieve your goals. Until then, I’ll mark this thread as resolved as it is out of my hands. Feel free to reopen if there’s any new development!

    Thread Starter samhudson444

    (@samhudson444)

    I recently lost my support for the theme last month lol. This kinda sucks.

    Thread Starter samhudson444

    (@samhudson444)

    There is this code:
    https://i.imgur.com/CNVW443.png not sure if that’s the right one but that is for a thumbnail

    Plugin Author pepe

    (@pputzer)

    You can try replacing that template with:

    
    <?php
    
    if ( has_post_thumbnail() ): ?>
        <div class="row">
            <div class="coll-md-12 post-block post-page-title-small">
                <?php the_post_thumbnail( 'magellan_post_single_small' ) ?>
            </div>
        </div>
    <?php endif; ?>
    

    This is untested of course, but it should be result in a reasonable equivalent to what the theme does on its own, but with the standard WordPress filters being run. (I found a copy of the theme on GitHub.). Alternatively, magellan_get_thumbnail() appears to be pluggable, so it things could be fixed “in there”, but the code is much longer than the template above.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Featured Image not showing (noob)’ is closed to new replies.