How do I set a specific photo as the start photo for image gallery post?

I’ve created an image gallery post here:

I’d like the following photo to appear as the first photo in the gallery slider:

I’ve set that image as the “featured image” but that doesn’t work.

I also reordered the gallery so that that photo is first, but that doesn’t work.

Please help and thanks in advance.

Hi Juan,

Thanks for writing in! Did you try re-arranging gallery shortcode IDs? You can see our knowledge base article here (
[gallery link="none" ids="17965,17964,17963,17962,17961,17960,17959,17958,17957,17956,17955,17954"]

You can also try Envira Gallery plugin which comes with X theme. Refer to our knowledge base article here (

If you’re still having issues, provide us with your WordPress login credentials in a secure note to check your issue further.



I did try re-arranging the Shortcode Id’s but that did not work.

I also tried using the Envira gallery plugin but that did not work either. (Just like the regular gallery, the Envira Gallery appears in the correct order but not the x-theme gallery slider). See the following link:

You’ll notice that the gallery at the bottom has the correct starting image (in the correct order). But the slider at the top starts with a different image. (we see the same behavior with the Envira Gallery).

I’ll send a secure note with login credentials so you can take a look.

Hi Juan,

The image set as the featured image will be skipped when displayed in gallery post format. The solution is re-uploading the same image on that same post, no need to inster, just re-upload it.


This did not work. I tried re-uploading the image and it still does not show up as the first image in the slider. Please help.

Hi Juan,

There is a way to re-order the Post Format and Portfolio Galleries, but it seems you need to deactivate the Gutenberg first as the Media Library in Gutenberg does not have an Uploaded to this post filter.

On this screen you can reorder your image attachments the way you would like.

Please read more details here.


I disabled Gutenberg and tried reordering the images and that didn’t work either. Please help.

Also, please remember that the problem is the SLIDER at the top of the post NOT the image thumbnails at the bottom of the post. The slider won’t display the correct order.

Hi Juan,

Please install this plugin to control the order of the images within the featured gallery section. It’s not our plugin so please contact the plugin author for further question.

Or, we can just include the featured images automatically by adding this code to your child theme’s functions.php

  function x_featured_gallery() {

    $stack     = x_get_stack();
    $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false;

    $args = array(
      'order'          => 'ASC',
      'orderby'        => 'menu_order',
      'post_parent'    => get_the_ID(),
      'post_type'      => 'attachment',
      'post_mime_type' => 'image',
      'post_status'    => null,
      'numberposts'    => -1

    $attachments = get_posts( $args );

    if ( $attachments ) {
      echo '<div class="x-flexslider x-flexslider-featured-gallery man"><ul class="x-slides">';
        foreach ( $attachments as $attachment ) {
          echo '<li class="x-slide">';
            if ( $fullwidth ) {
              echo wp_get_attachment_image( $attachment->ID, 'entry-fullwidth', false, false );
            } else {
              echo wp_get_attachment_image( $attachment->ID, 'entry', false, false );
          echo '</li>';
      echo '</ul></div>';


Then simply delete your already uploaded and the same image to prevent duplicates.


Hey Rad,

This code did not work. If you look at this post: the featured image is still not the first image to appear in the slider.

Please help.

For ease of managing and ordering image attachments, please use a plugin like WP Attachments:

Please see this demo:

Please also just note that like custom coding, we do not have support for third party plugins which this use case requires. We could not troubleshoot issues that would arise from either methods even if we have suggested the code as they are meant to be a guide only and not as part of our support service. In that event, please contact the plugin author or consult with a third party developer.

Hope that helps and thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.