2016-07-15 41 views
-2

我对WordPress非常陌生,我想在WordPress中创建自己的自定义横幅,而无需插件帮助。我试图寻找很多次,但能不能够解决我的问题,请人帮助我..提前如何在没有插件帮助的情况下在wordpress中创建横幅

+0

你可以使用HTML和jQuery代码。 –

+1

堆栈溢出不会为您编写代码。请提出具体的问题,并表明你在提问之前已经付出了努力。 –

回答

0

这里 由于是解决方案: 调用下面的代码在你的header.php关闭头标签

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
    <script type="text/javascript"> 
$(function() { 
$(".default .carousel").jCarouselLite({ 
btnNext: ".default .next", 
btnPrev: ".default .prev" 
}); 
}); 
</script> 
<link rel="stylesheet" media="all" type="text/css" href="<?php bloginfo('template_url');?>/css/style-demo.css"> 
//download this css from https://github.com/ganeshmax/jcarousellite and put it in your theme css directory 

<script src="<?php bloginfo('template_url');?>/js/jquery-1.11.1.js"></script> 
//download this js file https://github.com/ganeshmax/jcarousellite here and put it in your theme js directory 
<script src="<?php bloginfo('template_url');?>/js/jquery.jcarousellite.js"></script> 
//download this js file https://github.com/ganeshmax/jcarousellite here and put it in your theme js directory 

可以拨打下面的代码在WordPress页文本类型的内容,或者如果你想你也可以把它在你的WordPress PHP文件太多

<div id="jcl-demo"> 
<div class="custom-container default"><a class="prev" href="#">‹</a> 
<div class="carousel"> 
<ul> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" /></li> 
    <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" /></li> 
</ul> 
</div> 
<a class="next" href="#">›</a> 
<div class="clear"></div> 
</div> 
</div> 
+0

感谢您的回复,但我不是在寻找jquery ..我想在wordpress中使用php代码的帮助来显示手动创建的横幅。 – deeba

+1

先清除你的问题。这是用PHP代码手动创建的横幅,您只需在仪表板中将PHP,CSS和js代码调用到PHP文件和HTML代码中即可。 –

+0

这是我的问题,在wordpress中开发一个插件来管理前端横幅。 – deeba

相关问题