do_shortcode for [gallery id="x"] not working
-
Hi,
I have came across a problem trying to insert a gallery that I created in a post and putting it into a template page using the do_shortcode function.
I am using:
echo do_shortcode('[gallery id="253" link="file" columns="4"]');
253 is the post id, and in the post I have created a gallery using the “add media” button.
I have tried disabling all of my wordpress plugins to see if they were the problem, but I still have the problem with them all disabled.
I am able to do the following, which works:
echo do_shortcode('[gallery ids="231" link="file"]');
It just seems to be when I try and use the “id” option.
What is strange is that it was working fine. But when i re-created the post that I had the gallery in, it stopped working all together. I have updated the post ID to the most current one, I have even tried making another post and another new gallery within. But still failing.
Any help appreciated. Thanks
- The topic ‘do_shortcode for [gallery id="x"] not working’ is closed to new replies.