• Resolved nyoz

    (@nyoz)


    Hi! still using your plugin a lot, still enjoying it as much! 🙂

    I have a feature request though : Would it be possible to select parent also by ID, instead of only slug ?
    Because ID is constant, whereas the slug can be changed for whatever reason, and thus the shortcode put in different pages will stop working properly without further notice.

    Also, I have come through what seems to be a little bug. I have put this :
    [loop parent="oasis"]<div class="col-xs-6 col-sm-4 text-center produit-liste"><a href="[field url]">[content field="image" size="middle" in="id"]<div>[field title]</div></a></div>[/loop]

    But strangely the middle size parameter doesn’t seem to work. It works perfectly with thumbnail, large, and full. But putting size="middle" only retrieves the full image.

    I’ve checked and the media size are well set. Also the file does exist in the wp-content/uploads/ repository.

    Any idea why it’s not showing up ?

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    Thank you for the feedback, it’s very helpful to keep improving the plugin.

    Good point about selecting parent by ID. I added the feature in the latest update. It’s the same parameter, like parent="2". If it’s a number then the loop will get the parent by ID.

    About image size, it was a mistake in the documentation: it’s supposed to be size="medium". I’m glad you pointed this out. I made it so “middle” will work also. 🙂

    And, with the new [field] shortcode, you can use additional parameters like this:

    [field image size="medium"]
    Thread Starter nyoz

    (@nyoz)

    Great ! Like usual your answer is super-fast and super-efficient ! 😀

    It’s working now indeed. Thanks, keep up your wonderful work !!

    Thread Starter nyoz

    (@nyoz)

    Actually… I had another question :

    When I put [field image size="large" in="id" class="img-responsive"] the class img-responsive is added to an enclosing <div> instead of the <img > itself… Is there a way to add a class to the image itself in this case ?

    Thanks !

    Plugin Author Eliot Akira

    (@miyarakira)

    Good point! In the latest update, I added an image_class parameter, to add a class to the image itself.

    Thread Starter nyoz

    (@nyoz)

    Great, thanks !! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Select parent by id Middle size image’ is closed to new replies.