• Resolved dylan

    (@dylan)


    I’m working on a temnplate for use with a gallery post format. I’d like to use do_shortcode to present a gallery that is compatible with this plugin, but I can’t seem to get it to work. Here’s what I’ve tried:

    <?php echo do_shortcode('[gallery type="carousel"]'); ?>

    This will create the HTML for the gallery, but the image tags are missing. Incidentally, if I add the ids attribute to the gallery short tag, then it will work, but then I’d have to get the Id numbers every time, and I’m not sure how to do that.

    Does anybody have any ideas how to fix this?

    https://wordpress.org/plugins/agnosia-bootstrap-carousel/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrés Villarreal

    (@andrezrv)

    Hi Dylan,

    The shortcode will not work if there are no ids being provided, so you may want to obtain them dinamically.

    I think you can use something like this, but that would require to create a gallery for every post anyway. Or you can make use of the Attachments plugin, which is supposed to let you upload images to a post without showing them, and then you can obtain them through an array, though I haven’t tried it yet.

    Please let me know how it goes 🙂

    Plugin Author Andrés Villarreal

    (@andrezrv)

    I’m marking this as resolved, since it’s not really an issue with the plugin itself.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Agnosia Bootstrap and do_shortcode’ is closed to new replies.