Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4123808
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:39:33+00:00 2026-05-20T23:39:33+00:00

My question is very simple: Is it possible to import many images at once

  • 0

My question is very simple: Is it possible to import many images at once in a post (such as the gallery does) but inside a <ul> for instance ?
The gallery import is, I think, the only way to import a group of images inside a post, but I can’t handle the HTML in this case.
I can be wrong, but I didn’t find anything about that. Thank you for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:39:34+00:00Added an answer on May 20, 2026 at 11:39 pm

    You can insert your images in the gallery without importing it into your post. Then, in the single post template, you can query the images attached to the post to display them.

    Attachments are just posts attached to a post, so let’s use get_posts():

    function get_post_images($post) {
        $args = array(
            'post_type' => 'attachment', // Images attached to the post
            'numberposts' => -1, // Get all attachments
            'post_status' => null, // I don’t care about status for gallery images
            'post_parent' => $post->ID, // The parent post
            'exclude' => get_post_thumbnail_id($post->ID), // Exclude the thumbnail if you want it on your article list but not inside an article
            'post_mime_type' => 'image', // The attachment type
            'order' => 'ASC',
            'orderby' => 'menu_order ID', // Order by menu_order then by ID
        );
        return get_posts($args);
    }
    

    I suggest to place this function in the functions.php file.

    In your single.php file:

    <ul>
    <?php
        $images = get_post_images($post);
        foreach ($images as $image):
    ?>
    <li><?php echo wp_get_attachment_image($image->ID, 'medium'); ?></li>
    <?php endforeach; ?>
    </ul>
    

    WP Codex links:

    • get_posts()
    • Query parameters
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this may be a very simple question, but is it possible to force a
The question is very simple, does update_attributes validates every possible validation of the model,
Very simple question, is it possible to use a smarty var inside the {php}{/php}
I have a very simple question: Is it possible to change the price of
This question might appear very simple, but i haven't found an answer yet, so
Possible Duplicate: C programming division probably my question is very simple and stupid. I
I have a very simple question: Is or is it not possible to inflate
This seems like a very simple question, but I think hours of staring at
My question is very simple: Is it possible to pack plugins into extensions for
Maybe it's a very simple Question, but I don't know how to solve it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.