2016-07-15 42 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

相關問題