gallery in excerpt

Posted in: Newspaper
Post count: 2

hello, i am running an online publication website. http://Www.Archix.org.

i am thinking to put gallery at the excerpt . however the excerpt doesn’t allow shortcodes of [gallery] to be inserted.

any idea how can i enable shortcode for this theme ? thanks.

Post count: 22421

Hello,

Unfortunately the excerpt does not allow a gallery to be placed inside it. But if you want an image galery on your page you can add it from the visual editor when creating your page: https://forum.tagdiv.com/gallery-2/
It probably can be done with custom work but it will be no easy task.

Thank you!

Post count: 2

hi bogdan,

thanks for the prompt reply.
i asked the same question in another wordpress forum, some of the advise given is to add this in the code.

<?php echo do_shortcode(“[gallery]“); ?>

i’ve tried in index.php but it doesn’t work. it it could be worked out , maybe i can give it a try.

thanks

Post count: 22421

Hello,

The correct code would be this:
<?php echo do_shortcode('[gallery ids="364,327,302,223,149,21,23,16"]');?>
You have to insert the image id’s for your gallery.
You can create your gallery in visual mode and then switch to text mode and get the shortcode: http://screencast.com/t/BujdZhVK
This shortcode will work if placed on modules for example: http://screencast.com/t/7HvrsEavAgL
But this will generate the same gallery for every post displayed on that module and i don;t think this is the result you want. http://screencast.com/t/YwoaF1SjN Everywhere you place the code, the same gallery will appear over and over in all post excerpts.
Please provide more details to what you want to achieve.

Thank you!

  • This reply was modified 10 years by Bogdan B..
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.