如何在Wordpress中自定义标签?

时间:2015-11-03 11:17:01

标签: javascript html wordpress twitter-bootstrap customization

我正在尝试在wordpress中创建自定义的,可切换的标签,但我被卡住了。我想将标签的标题部分更改为图像。像这样的东西,但在wordpress:

http://jsfiddle.net/iamraviteja/ttpxoxob/1/



<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />

<ul class="nav nav-tabs">
  <li class="active"><a data-toggle="tab" href="#home">Home</a>
  </li>
  <li>
    <a data-toggle="tab" href="#menu1">
      <img src="http://www.downloadsbyvita.com/images/video.jpg" />
    </a>
  </li>
  <li><a data-toggle="tab" href="#menu2">Menu 2</a>
  </li>
</ul>

<div class="tab-content">
  <div id="home" class="tab-pane fade in active">
    <h3>HOME</h3>
    <p>Some content.</p>
  </div>
  <div id="menu1" class="tab-pane fade">
    <h3>Menu 1</h3>
    <p>Some content in menu 1.</p>
  </div>
  <div id="menu2" class="tab-pane fade">
    <h3>Menu 2</h3>
    <p>Some content in menu 2.</p>
  </div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

您可以使用bootstrap或inbuilt jquery ui。或Tabs Shorcode plugin