WordPress tutorials: Gallery in template

Wpsnipp – In WordPress 2.5, the Gallery feature allows the option to add an image gallery to a Post or Page on your WordPress blog. You can use this PHP code to insert a gallery directly into your wordpress template.You can also print a gallery directly in a template like so:



$gallery_shortcode = '';
print apply_filters( 'the_content', $gallery_shortcode );

Leave a comment