更改wordpress代码库中的代码

问题描述:

我已经制作了自己的wordpress主题,并使用了插件来创建照片库。 现在我得到这样的:更改wordpress代码库中的代码

<dl class='gallery-item'> 
<dt class='gallery-icon landscape'> 
    <a href="http://*****.com/gallery/img_2233/"> 
    <img class="attachment-thumbnail" height="150" width="150" alt="IMG_2233" src="http://*****.com/wp-content/uploads/2013/08/IMG_2233-150x150.jpg" ...> 

我可以改变这个代码,而无需任何插件?如果是这样,在哪里?我想使用百分比宽度和高度。

我需要以下结果:

<dl class='gallery-item'> 
<dt class='gallery-icon landscape'> 
    <a href="http://*****.com/gallery/img_2233/"> 
    <img class="attachment-thumbnail" height="60%" width="60%" alt="IMG_2233" src="http://*****.com/wp-content/uploads/2013/08/IMG_2233-150x150.jpg" ...> 

任何建议,从哪里变画廊代码?

在CSS中,您可以覆盖attachment-thumbnail类。

将此添加到style.css或通过自定义CSS。

.attachment-thumbnail { 
height: 60% !important; 
width: 60% !important; 
} 

或者您可以搜索“attachment-thumbnail”这个术语并替换现有的高度和宽度设置。