我对你的问题的理解是,你想使用一个弹出窗口,其中包含除媒体上传器以外的内容。要实现这一点,请执行以下步骤:
添加此代码以包含thickbox脚本。
<?php
add_action(\'init\', \'init_theme_method\');
function init_theme_method() {
add_thickbox();
}
?>
将class=\'thickbox\'添加到显示弹出窗口的任何可单击元素中。
<input alt="#TB_inline?height=300&width=400&inlineId=examplePopup1" title="add a caption to title attribute / or leave blank" class="thickbox" type="button" value="Show Thickbox Example Pop-up 1" />
请注意,在最后一段代码中有一个inlineId参数。这将是弹出框中显示的代码。
<div id="examplePopup1" style="display:none">
<h2>Example Pop-up Window 1</h2>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sed laoreet est. Etiam nec nibh aliquam leo maximus hendrerit. Aliquam velit erat, pretium eget faucibus ut, ullamcorper in sapien. Nulla dignissim turpis et pharetra vestibulum. Nulla et mattis eros. Integer consequat, odio sed gravida bibendum, dui purus viverra nisl, nec fringilla ante nibh non lorem. Morbi at tristique diam. Mauris et aliquam tellus, vehicula dapibus odio. Maecenas vulputate turpis ac orci fringilla, id cursus augue mollis. Aliquam sit amet ligula tellus.
<strong>Just click outside the pop-up to close it.</strong>
</div>
我希望这能有所帮助
资料来源:Create Pop-up Windows in Your WordPress Blog with Thickbox