• Resolved agnemedia

    (@agnemedia)


    It’s possible to change the order media credit
    <figcaption itemprop=”caption” id=”caption-attachment-1016744″ class=”wp-caption-text”>…..
    <span class=”media-credit”>Matthew D</span>
    </figcaption>

    If possible to move span before figcaption
    like this
    <span class=”media-credit”>My Name</span>
    <figcaption itemprop=”caption”

    All will sit perfectly for all device

    Currently, each image need a manual adjustment (if images small is an issue if the image is inserted to the article with 1/3 = it’s an issue)

    https://subscription.ukrweekly.com/2021/11/st-john-the-baptist-church-celebrates-centennial-anniversary/

    What options or custom changes can be made to position correctly

    • This topic was modified 3 years, 3 months ago by agnemedia.

    The page I need help with: [log in to see the link]

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

    (@pputzer)

    What editor are you using? Classic or Block?

    If you are using the Classic Editor with shortcodes, you can use the filter hook media_credit_shortcode_html5_caption to re-earrange the shortcode and caption order (but only inside <figcaption>). You can also replace the whole shortcode by changing the shortcode function to something else, but that gets messy quickly as you’d basically have to duplicate https://github.com/mundschenk-at/media-credit/blob/master/includes/media-credit/components/class-shortcodes.php#L142.

    For the Block Editor, there’s the media_credit_block_editor_caption hook which works in a similar way. Again, it allows you to re-arrange the order inside <figcaption>.

    Semantically, the credit is part of the caption, not the image. I’m not sure what you are trying to achieve, but it most likely can be done by CSS instead of moving the media credit outside of the <figcaption>.

    Thread Starter agnemedia

    (@agnemedia)

    We using Classic editor (we have over 80k posts from old themes)
    We now switch to elementor

    Goal: (from media )
    1) On the Image (bottom left: Credit)
    2) under the image (Title)

    challenge: to position “credit” on the image. (if image short fill out from bottom to top on the image

    Changes in global (not only one post)
    For featured large images over 800px no issue
    Can you please share which file can be edited to implement fix globally (is any options to prevent overwrite if Enable auto-updates?)

    • This reply was modified 3 years, 3 months ago by agnemedia.
    Plugin Author pepe

    (@pputzer)

    Sorry for the late reply. Positioning with CSS can very likely be done in the way you describe (i.e. with position: relative, position: absolute and/or negative margins), but the details strongly depend on your HTML markup and your other element styles. (This veers into web design consulting more than any specific issue with the plugin.)

    I’ve linked to the relevant part of the plugin, if that is not enough to get you started, I don’t think you really want to roll your own shortcode here. If it is still relevant, what I can offer you is an enhancement ticket to make the partial templates overridable. This way, you could provide your own markup in a relatively accessible way (doing this with ordinary filters get’s messy quickly, better to have a way to insert your own partials in a custom theme). Still, I think your outcome should be achievable with pure CSS.

    Thread Starter agnemedia

    (@agnemedia)

    I’m using the classic editor and Elementor Pro
    My target is to position on the images credit
    sample
    [………]
    […credit]

    I’m facing media credit is not fixed to the bottom edge photos
    if image is 480px and 1440px is off

    Thank you

    Plugin Author pepe

    (@pputzer)

    Hi @agnemedia, I’m not sure what you are looking for from me at this point. You need help with the CSS markup on the page indicated in your original post?

    While I’m willing to take a look if you can direct me to a page that shows the issue at hand, this is veering a lot into general web design questions.

    Plugin Author pepe

    (@pputzer)

    @agnemedia, have you been able to resolve the issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Media credit (order: Image, media-credit, figcaption)’ is closed to new replies.