如何在没有插件帮助的情况下在 wordpress 中创建横幅

How to create a banner in wordpress without help of plugin

我是 WordPress 的新手,我想在没有插件帮助的情况下在 WordPress 中创建自己的自定义横幅。我试图搜索很多次但无法解决我的问题,请任何人帮助我.. 提前致谢

解决方法如下: 在关闭 head 标签

之前,在 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>