0
我已阅读了很多关于造型WordPress的画廊的帖子和文章,但我想改变结构。以下是一个正常的图库代码的例子。我想删除<dl> <dt> <br>
并用我自己的元素替换它们。任何想法,我可以在Wordpress文件结构中做到这一点?更改WordPress的画廊结构
<div id="gallery-1" class="gallery galleryid-1 gallery-columns-1 gallery-size-thumbnail">
<dl class="gallery-item">
<dt class="gallery-icon">
<a href="http://mydomain.com/2012/01/hello-world/dsc_0003/" title="DSC_0003"><img width="376" height="250" src="http://mydomain.com/wp-content/uploads/2012/01/DSC_0003-376x250.jpg" class="attachment-thumbnail" alt="DSC_0003" title="DSC_0003"></a>
</dt>
</dl>
<br style="clear: both">
<dl class="gallery-item">
<dt class="gallery-icon">
<a href="http://mydomain.com/2012/01/hello-world/dsc_0003/" title="DSC_0003"><img width="376" height="250" src="http://mydomain.com/wp-content/uploads/2012/01/DSC_0003-376x250.jpg" class="attachment-thumbnail" alt="DSC_0003" title="DSC_0003"></a>
</dt>
</dl>
<br style="clear: both">
</div>
任何帮助将不胜感激。谢谢。
听起来不错。我可以直接编辑/wp-includes/media.php文件。如果我确实选择将shortcode复制到functions.php中,那么我将该文件放在哪里?在顶部? – 2012-04-25 14:47:11
是的,您可以使用重复函数'gallery_shortcode()''add_shortcode('gallery','gallery_shortcode');'并重命名它,并且还排除节if(is_feed()){output} {0} {0} {0} \ n“; \t \t的foreach($附件,$ att_id => $附件) \t \t \t $输出。= wp_get_attachment_link($ att_id,$大小,真)。 “\ n” 个; \t \t return $ output; \t}'当你把它复制到function.php – 2012-04-25 15:08:51