我想在WordPress Post中插入一个图像,我想提供一个动态URL,这样如果主机发生变化,它会自动更改。这是我的代码:
<div class="hmbox-right">
<h1>Quality</h1>
<img src="<?php bloginfo('template_url'); ?>/images/logo.jpg">
<p>Welcome to Turn Tekniks India, TUV ISO 2001 company, Manufacturer of Compasses (Drawing Instrument, Pencil Sharpeners and Crayon Holder.</p>
</div>
答案 0 :(得分:1)
试试这个
<div class="hmbox-right">
<h1>Quality</h1>
<img src="<?php get_template_directory(); ?>images/logo.png" alt="logo"
<p>Welcome to Turn Tekniks India, TUV ISO 2001 company, Manufacturer of Compasses (Drawing Instrument, Pencil Sharpeners and Crayon Holder.</p>
</div>
这应该有效!