• sadhaka

    (@sadhaka)


    Can this plugin (free or ‘premium’) find text inside captions of images that are generated by Justified Image Grid short codes? Thanks.

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

    (@msaari)

    I don’t know, and since it’s a Premium plugin, I don’t really have a way to find out. The only way to find out is to give it a go.

    Relevanssi can expand shortcodes, so maybe, but that would depend on what the expanded shortcode content looks like. It may require filtering.

    Thread Starter sadhaka

    (@sadhaka)

    Ah sorry I thought you might have had experience of this one.

    When you say “give it a go”, do you mean the free or the paid-for version?

    I did try the free version, and it didn’t do it out of the box (as I didn’t expect), but I don’t really understand what might be the extra implementation or configuration involved.

    As far as I can tell, the expanded short code content is just regular HTML (a div with a class, etc)—though maybe that’s not what you meant.

    “May require filtering” — I’m guessing this means some extra function for the child theme to extend the plugin’s scope?

    Plugin Author Mikko Saari

    (@msaari)

    No, I’ve never heard of the plugin. There are so many premium plugins out there.

    But yes, that’s exactly what I mean – what does the HTML code look like? That’s what Relevanssi sees (if the shortcode is defined the usual way), so that’s relevant. The HTML tags used for the captions are significant.

    If the HTML format is, for some reason, hard for Relevanssi to parse, a filter function may be necessary to parse it to something Relevanssi can handle.

    Thread Starter sadhaka

    (@sadhaka)

    Hm OK. Well as far as I can see the caption is nested divs until it gets to:

    <div class="jig-caption-title">My Caption</div>
    Plugin Author Mikko Saari

    (@msaari)

    That in itself should not be a problem. Relevanssi removes the HTML tags before indexing. You can use the relevanssi_post_content filter hook to check how Relevanssi sees the post content before it’s indexed. That’ll show you how Relevanssi sees the JIG shortcodes.

    Thread Starter sadhaka

    (@sadhaka)

    Hm OK. Well I’m not getting anywhere!

    The short code is always like:

    [justified_image_grid gallery=1361]

    ..and rendered HTML (for each gallery element) is always like:

    <div class="jig-caption-title">My Caption</div>

    … but no filter seems to work! Never mind!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can this find captions of images made by JIG short codes ?’ is closed to new replies.