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

    (@pputzer)

    Hi @brucerawles, this is something I’ve already been thinking about. Do you need an interim solution (using filter hooks) or would you be able to wait for the next feature release (in about one or two months)?

    Thread Starter BruceRawles

    (@brucerawles)

    Hi Pepe:

    MANY THANKS for the speedy reply! ??

    If you have an interim (filter hooks) solution I could try that might be helpful… I’ve used Genesis hooks and can do simple “copy/paste” editing on the functions.php file if that’s the sort of patch you have in mind. I’m definitely not a PHP programmer, but with a bit of guidance, I can do simple edits. ??

    Otherwise, the next release in a month or two would be great, too. I’ll let my client know after I hear back from you; I imagine he’ll go for the interim “patch” if I can try it quickly. ?? BTW, my understanding is that having the caption below the credit is the norm (from talking with my client who is a former professional journalist, now semi-retired), so if that matches with your understanding, that might be a good default (aside from the fact this it might require educating all your other plugin users! ??

    MUCH appreciated! ??

    Thread Starter BruceRawles

    (@brucerawles)

    Hi again Pepe:

    Any updates regarding an interim solution? THANKS! ??

    Plugin Author pepe

    (@pputzer)

    Will look at it on the weekend.

    Plugin Author pepe

    (@pputzer)

    @brucerawles, if you use the shortcodes, you can use the filter hook media_credit_shortcode_html5_caption to reverse the order in the <figcaption>. For the block editor, there is a similar hook media_credit_block_editor_caption.

    A fix might look like this (untested):

    
    function brucerawles_reverese_credit_caption_order( $ignored, $caption, $credit ) {
        return "{$credit} {$caption}";
    }
    add_filter( 'media_credit_shortcode_html5_caption', 'brucerawles_reverese_credit_caption_order', 10, 3 );
    add_filter( 'media_credit_block_editor_caption', 'brucerawles_reverese_credit_caption_order', 10, 3 );
    
    • This reply was modified 5 years, 6 months ago by pepe. Reason: Added fix suggestion
    Thread Starter BruceRawles

    (@brucerawles)

    @pputzer: Thanks!!! So is there a way to make this a global change for ALL instances (e.g. a snippet of code I could add to functions.php and/or style.css that would implement the filter hook you mention above and reverse the order for ALL photo credits and captions? I’m using Genesis Simple Hooks which can use shortcodes; would there be something similar I could try to make this a global change? Please advise.

    (I’m using the “Genesis Metro Pro” theme on this site of which this page (with the desired caption reversal) is an example: https://yachatsnews.com/yachats-council-reverses-direction-to-award-control-of-sunday-farmers-market/)

    THANKS again, and in advance for further suggestions of how to implement. ??
    OOPS! Somehow I missed the php code snippet! … I’ll try that now… ??

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

    (@pputzer)

    @brucerawles, looks like I added my code snippet while you were writing the reply. It should work for both Classic and Block Editor. (Oh, and please excuse the typo in the function name – I can’t edit that post anymore.)

    • This reply was modified 5 years, 6 months ago by pepe.
    Thread Starter BruceRawles

    (@brucerawles)

    Works PERFECTLY!!! Many thanks, @pputzer !!! ??

    Plugin Author pepe

    (@pputzer)

    Glad to hear that, @brucerawles! I’ll see if I can make this a feature from the UI (without complicating things). (BTW: If you could find the time to leave a review of the plugin, that would be a great help.)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Need credit ABOVE caption’ is closed to new replies.