0
我创建了一个wordpress主题,我有5张图片,我想用它来发布。有可能当用户加载我的主题时,我的5张图像会自动放置在媒体库中?自动添加图像到媒体库
我创建了一个wordpress主题,我有5张图片,我想用它来发布。有可能当用户加载我的主题时,我的5张图像会自动放置在媒体库中?自动添加图像到媒体库
将图像放置在主题文件夹中。然后像这样检索它们:
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/img1.jpg" />
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/img2.jpg" />
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/img3.jpg" />
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/img4.jpg" />
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/img5.jpg" />
为什么要将它们添加到媒体库?为什么不把它们与你的主题打包? – chrisn 2012-04-21 17:15:32