我试图将一系列CSS选项卡添加到我的wordpress页面中,但是它似乎不起作用(例如,当我将下面的代码粘贴到wordpress页面中时,它会剥离一些主要组件的选项卡)。下面是一个指向已完成的选项卡应该是什么样子的链接:
http://www.stylerepublicmagazine.com/csstabs.html
下面是我试图粘贴到WordPress的代码,是的,所有必要的CSS文件都被上传到我的主题中。知道为什么Wordpress不能正确地显示它吗?
<div class="tabbed-view">
<!--tabbed 01 Starts here-->
<form>
<div class="tab-container grey left rounded">
<label class="tab-label">
<input class="tab-radio" type="radio" name="page" value="page5" checked="checked"/>
<h2 class="tab">Interiors</h2>
<article class="tab-page" id="page5">
<h3>Description</h3>
<h4>Subtitle</h4><p>Your content here</p><p> Aenean tortor mi, imperdiet id, gravida eu, posuere eu, felis. Mauris sollicitudin, turpis in hendrerit sodales, lectus ipsum pellentesque ligula, sit amet scelerisque urna nibh ut arcu. Aliquam in lacus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla placerat aliquam wisi.</p><p> Mauris viverra odio. Quisque fermentum pulvinar odio. Proin posuere est vitae ligula. Etiam euismod. Cras a eros.</p>
</article>
</label>
<label class="tab-label">
<input class="tab-radio" type="radio" name="page" value="page6" />
<h2 class="tab">Bathrooms</h2>
<article class="tab-page" id="page6">
<h3>Stylish Bathrooms</h3>
<h4>Subtitle</h4><p>Your content here</p>
</article>
</label>
<label class="tab-label">
<input class="tab-radio" type="radio" name="page" value="page7" />
<h2 class="tab">Kitchen</h2>
<article class="tab-page" id="page7">
<h3>Modern Kitchen</h3>
<h4>Subtitle</h4><p>Your content here</p>
</article>
</label>
<label class="tab-label">
<input class="tab-radio" type="radio" name="page" value="page8" />
<h2 class="tab">Extra Details</h2>
<article class="tab-page" id="page8">
<h3>Extra Details</h3>
<h4>Subtitle</h4><p>Your content here</p>
</article>
</label>
</div>
</form>
</div>
<br clear="all" /></div>发布于 2014-04-15 20:15:32
你说“所有必要的CSS文件都上传到我的主题”,它们是链接的吗?
如果没有,请将以下一行添加到wordpress主题的header.php文件中:
<?php if(is_page([YOUR PAGE ID])) { ?>
<link href="<?php bloginfo('template_url'); ?>/[CSS FIlE Name].css" type="text/css" rel="stylesheet" />
<script src="<?php bloginfo('template_url'); ?>/[JAVASCRIPT FIlE Name].js" type="text/javascript"></script>
<?php } ?>用正确的值替换页面Id、CSS和Javascript。
https://stackoverflow.com/questions/23088587
复制相似问题