Adrian Domenico
Forum Replies Created
-
Forum: Plugins
In reply to: [Gutenberg] Left/right aligned pullquotes not editable/selectableFIX: 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.Forum: Plugins
In reply to: [Media Credit] Featured Images: Cannot call the credits.Thank you. This works. All I need to do now is make it conditional and wrap it in the
.media-creditclass. 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.$postis 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.