While gallery shortcode does have id
arguments, it won’t do what you think.
If that argument is present WP will try to look for child attachments of that post, using get_children()
. It won’t take content of the post and shortcodes in it into account.
If the gallery is only content of that page you could try the following (not tested):
echo do_shortcode( get_post_field( 'post_content', 63 ) );
Related Posts:
- How to have different captions for same image, for galleries?
- How can I make all gallery images to open in a new window?
- get attributes/part of the gallery shortcode
- Editing built in Gallery shortcode to filter by categories
- Turn off image captions in gallery view?
- Ho to add “Create Slider” option to default “Add Media” popup?
- Don’t show images inserted into content
- Load Gallery Images with Title on Homepage BX Slider
- change the h3 subtitles of the wordpress gallery shortcode
- How do I delete all UNUSED images from my uploads directory?
- How to extend the gallery block in Gutenberg?
- Prevent WordPress from adding image’ title automatically
- Overide Gallery Default Link to Settings
- get_post_gallery with Gutenberg
- Featured image shortcode
- get_post_gallery_images returns thumbs . I want full size
- WP 3.5 and Galleries – how to count images?
- Cropped featured image replaces original image in gallery
- Always use for post images
- get images from post and make a zip
- Bulk edit wordpress images alt and title attributes
- Change the output for [gallery] shortcode
- Making WordPress Gallery (.gallery-item) Responsive?
- Excludes posts that don’t have attachments in the_content()
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- Setting up a gallery with images and a zip download
- How to remove title attribute from gallery links and images
- How to display a shortcode caption somewhere other than the_content
- The WordPress Gallery, Grabbing The Link and Images?
- Displaying a featured image (only img url) as the img src?
- How to force WordPress to add new images at the beginning of the gallery?
- How to link Gutenberg Gallery images To Media file automatically?
- How to Make WordPress Default gallery responsive on mobile?
- Different captions for the same image in multiple galleries. Edit Image in Gallery locally
- How do i reference the theme path in pages for images?
- change wordpress gallery shortcode to slider
- Best option for photo/gallery handling?
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- Gallery post images on homepage?
- How to create a simple slideshow out of a post image gallery?
- How to change the target size of images clicked on in WordPress standard gallery
- Get meta data from image
- Shortcode for a link and thumbnail
- Exclude featured image from gallery in wp-admin
- Is my code is right to make image shortcode
- Set Post Image Using Shortcode
- Override img class in gallery
- Pull Random Attachments With Pagination
- wordpress get gallery images title
- Exclude images from “inserted into post” when trying to get attachments
- Is this post using WordPress Gallery?
- Customizing the attachement page to show rest of all images in a gallery from post
- Unyson Framework doesn’t show gallery images
- Undefined index: sui_image_caption in [closed]
- add_shortcode to capture URL screenshot not loading correctly
- Removing featured image from gallery?
- Creating a post image to show in a gallery
- Gallery with thumbnail carousel
- Media gallery images url instead of ID on WP API Response
- Get all image IDs from the Media Library
- Re-ordering images in existing post in wordpress 3.6.1
- Autosort uploads in galleries by filename
- How to display original unmodified thumbnail
- One picture belonging different galleries?
- Allow users to contribute images to a post
- Weird failing request
- Prevent WP from wrapping html in caption shortcode after ‘image_send_editor’ filter is applied
- Use full size images in a specific gallery
- How to automatically populate a gallery with images attached to posts of one category?
- Pagination between images (active/inactive)
- Excluding post thumbnail from the attachment.php when using wordpress gallery
- How do I display the featured image from an image gallery using a reference in code? (example within)
- Can i have 2 separate Galleries on 2 separate pages each go to a DIFFERENT Attachment.php file?
- attach several images to post + gallery
- how to stop a gallery slideshow
- Allow users to upload and display multiple photos
- Shortcode not work in picture source srcset tag
- how automatically show the image title before the image caption/description in a wordpress gallery?
- Images getting smashed
- How to re-arrange images in default WP Gallery more than one image at once?
- Convert multiple image blocks to gallery block in Gutenberg?
- get_post_gallery with Gutenberg
- Post Images are not showing up whenever I use shortCodes in my posts
- WordPress Shortcode to display featured images only
- How do i replace the title attribute of img tag with the image caption
- Show WordPress Image Title Under Custom Portfolio Image
- Replacing an Image gallery
- Thumbnail gallery by date and taxonomy
- How to display every pictures from all the posts on one page?
- How to add multiple images in a page
- Thickbox not displaying just the image, instead showing full page in lightbox
- Multiple gallery thumnbnails on one page
- Paginate Gallery [closed]
- How do I set the sizes of my thumbnails when inserting a [gallery]?
- Display X images from a gallery in the sidebar
- Adding different classes to different images depending on size for fine control of image layout in posts
- Automatically adding blog images to a portfolio/gallery
- Can I turn an image into a button?
- Image Attachments Query Not Working If Post Is Loaded Via Ajax
- Images uploaded in customized gallery do not link to media