Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Adrian Domenico

    (@adomenico)

    FIX: A few minutes after posting this I had an idea. For those who also have this issue try applying position:relative; z-index:99; to [data-type"core/pullquote"][dta-align="left/right"]. My styles need a rethink (surprise, surprise) but the block is now accessible when aligned left or right.

    Thread Starter Adrian Domenico

    (@adomenico)

    Thank you. This works. All I need to do now is make it conditional and wrap it in the .media-credit class. I pawed over the code in your plugin (the work on core/image is a very welcome inclusion) and found it difficult to believe that there wasn’t a solution, and that I was definitely missing something. $post is indeed the blog post itself, not a post object. So is $post_id. I failed to define that variable in that function inside the tag… I did get quite confused! But WordPress, like anything else, has its own set of challenges.

    I retract what I said about giving your attention to a simpler method for calling featured image credits but I would suggest, if I may, that more usage examples would be helpful.

    For everyone’s information, the following works in my template-tags.php:

    <span class="media-credit">
      <?php
        if (class_exists( 'Media_Credit' ) ) {
          \Media_Credit::html( \get_post_thumbnail_id( $post_id ) );
        }
      ?>
    </span>

    … and falls back gracefully if the plugin is deactivated.

    I have a little more CSS to do and that should be your plugin fully integrated to my solution.

    Thanks again, Pepe.

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