更改图库的输出HTML

时间:2018-03-11 14:24:34

标签: php wordpress

Wordpress提供了" Add Media "功能,您可以在其中添加图片库。

我正在复制几个步骤。

enter image description here

enter image description here

enter image description here

安装默认的WordPress主题时,它的外观如下→

enter image description here

问题:

就像我们在前端自定义默认的WordPress评论系统一样,我们如何在画廊中按照我们想要在前端查看的方式自定义它?

更新→

<div class="entry-content"> 目前一切都在上面的div下。我们如何改变整个HTML结构?

1 个答案:

答案 0 :(得分:0)

您可以在主题文件夹中编辑主题。转到WordPress的根目录。然后转到/wp-content/themes/your_theme

在这里你应该找到不同的模板,例如:

post.php => the generic page template
single.php => the generic template for news
archive.php => the generic template for listing of news

这3个应该符合您的需求。编辑这些文件中的HTML以获得所需内容!

相关问题