Events Made Easy Forums Generic Allow multiple images to properly attach to locations

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43611
    Anonymous
    Inactive

    Hi Franky,

    Would be great if images could be stacked onto a location properly (i.e. enable the built in gallery feature) to attach to a location, at the moment it seems we need third party plugins to hack images into place when wordpress has perfectly good features that are good to go if only we could access them 🙂

    At the moment, I add images to a page/post/cpt but I don’t insert them into post (so literally just attach them) then use this code to output them in my theme:

      <?php

      $attachments = get_posts( array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => $post->ID ) );

      if ( $attachments ) {

      foreach ( $attachments as $attachment ) { ?>

    • <?php echo wp_get_attachment_image( $attachment->ID, ‘medium’ ); ?>
    • <?php } ?>

      <?php } ?>

    This would be mega useful if you could look into it… The workaround of using plugins and short codes is not toooo bad but it means you have to have it within the #_NOTES and you might not want them at that point of the page in your theme…

    Any chance?

    #49081
    Franky
    Keymaster

    Since events are not posts there’s no other way than using shortcodes …

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Generic’ is closed to new topics and replies.
Scroll to Top