如何加载或链接到wordpress post图像
我有一个滑块显示通过点击它在更大的尺寸后画廊格式的图像 我有下面的代码 我在这个url中输入了数据srchttp://wpthemetestdata.files.wordpress.com/2012/12/unicorn-wallpaper.jpg 当点击任何图像直接加载这个图像,但我想当把一个wordpress函数放在数据src中,直到点击任何图像直接显示或加载这个图像如何加载或链接到wordpress post图像,wordpress,image,slideshow,Wordpress,Image,Slideshow,我有一个滑块显示通过点击它在更大的尺寸后画廊格式的图像 我有下面的代码 我在这个url中输入了数据srchttp://wpthemetestdata.files.wordpress.com/2012/12/unicorn-wallpaper.jpg 当点击任何图像直接加载这个图像,但我想当把一个wordpress函数放在数据src中,直到点击任何图像直接显示或加载这个图像 <ul id="lightGallery" class="gallery"> <?php foreach
<ul id="lightGallery" class="gallery">
<?php foreach ($post_images as $post_image) : ?>
<li class="col-lg-4" data-title="" data-desc="" data-responsive-src="" data- src="http://wpthemetestdata.files.wordpress.com/2012/12/unicorn-wallpaper.jpg">
<a href="<?php the_permalink(); ?>">
<?php echo wp_get_attachment_image( $post_image->ID, array() ); ?>
</a>
</li>
我使用下面的函数解决了我的问题
echo wp_get_attachment_url($post_image->ID);