• Resolved markusk

    (@markusk)


    trying to use media credit with http://theme.co/x/ and seem to be facing the same issue someone else had a while ago:
    http://wordpress.org/support/topic/plugin-media-credit-featured-image-credit

    i’m getting the post author’s name, not the credit field.

    i already contacted the theme’s support to make sure the place i’m adding the template-tags actually is within the loop – which it is. so – any other ideas? this theme is split into a lot of pieces, so i guess just the file (content.php) i added the tags to won’t help:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
            <?php x_featured_image(); ?>
            <?php get_media_credit($post); ?>
            <?php the_media_credit($post); ?>
      </div>
      <div class="entry-wrap">
        <?php x_get_view( 'integrity', '_content', 'post-header' ); ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
      <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?>
      <?php x_google_authorship_meta(); ?>
    </article>

    tia,
    markus.

    https://wordpress.org/plugins/media-credit/

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

    (@pputzer)

    You need to supply the post-ID of the featured image, not of the parent post (via get_post_thumbnail_id):

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
            <?php x_featured_image(); ?>
            <?php the_media_credit_html(get_post_thumbnail_id()); ?>
      </div>
      <div class="entry-wrap">
        <?php x_get_view( 'integrity', '_content', 'post-header' ); ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
      <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?>
      <?php x_google_authorship_meta(); ?>
    </article>
    Thread Starter markusk

    (@markusk)

    ah.. ok.. silly me..

    something else, can’t find if it’s actually a feature: all my media’s credit fields have been filled with the uploading user’s name after installation, is this normal? is there a way to turn this off and/or nuke all prefilled entries (but probably not without doing it in mysql i guess..)

    thanks,
    markus.

    Plugin Author pepe

    (@pputzer)

    No, unfortunately not. The next version will have an option to ignore the attachment authors, though (i.e. you will only see “freeform text” credits).

    Thread Starter markusk

    (@markusk)

    thanks!

    Thread Starter markusk

    (@markusk)

    something else cropping up.. posts not having a featured image assigned still show the author’s name in the place the credit would be if there was an image.. expected? using this code now:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
            <?php x_featured_image(); ?>
      <div class="caption">
            <?php the_media_credit(get_post_thumbnail_id()); ?>
      </div>
      </div>
      <div class="entry-wrap">
        <?php x_get_view( 'integrity', '_content', 'post-header' ); ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
      <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?>
      <?php x_google_authorship_meta(); ?>
    </article>

    Plugin Author pepe

    (@pputzer)

    Put your caption inside a conditional statment with has_post_thumbnail().

    http://codex.wordpress.org/Function_Reference/has_post_thumbnail

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘media credit & X theme’ is closed to new replies.