Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自定义主题的wordpress插件_Wordpress_Plugins_Themes_Integration - Fatal编程技术网

自定义主题的wordpress插件

自定义主题的wordpress插件,wordpress,plugins,themes,integration,Wordpress,Plugins,Themes,Integration,我正在尝试制作一个自定义的WordPress主题。我想安装一个Jquery插件(幻灯片)。到目前为止,我已经安装了一个我创建的主题,但不知道如何使用我的主题创建插件接口。我是否需要在div中声明一个空格,或者在主题中放置一些php代码,以便插件知道要去哪里?您可以直接为滑块编写jquery代码。例如,在“我的模板”页面中应用手风琴滑块: header.php文件,将其保存在自定义主题文件夹中 <!DOCTYPE html> <head> <meta charset=

我正在尝试制作一个自定义的WordPress主题。我想安装一个Jquery插件(幻灯片)。到目前为止,我已经安装了一个我创建的主题,但不知道如何使用我的主题创建插件接口。我是否需要在div中声明一个空格,或者在主题中放置一些php代码,以便插件知道要去哪里?

您可以直接为滑块编写jquery代码。例如,在“我的模板”页面中应用手风琴滑块:

header.php
文件,将其保存在自定义主题文件夹中

<!DOCTYPE html>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php
global $page, $paged;

wp_title( '|', true, 'right' );

// Add the blog name.
bloginfo( 'name' );

// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
    echo " | $site_description";

// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
    echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );

?></title> 
 <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-
 1.7.1.min.js"></script>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style/main.css"  
 type="text/css" />
<script src="<?php bloginfo('template_url'); ?>/js/jquery.easing.1.3.js" 
 type="text/javascript"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.kwicks-
1.5.1.pack.js"></script>
<!--Accordion -->
<script type="text/javascript">
        $(document).ready(function() {
            $('.kwicks').kwicks({
                max : 800,
                spacing : 5
            });
        });
</script>
   <!--end Accordion-->
   </head>
    <body>
    <div id="wrapper">
  <div class="w1">
    <div class="w2">
        <!-- header -->
        <header id="header">
            <div class="line"></div>
            <!-- logo -->
                <h1 class="logo"><a href="#">xcvdfgdf - Career Development  
                 Centre</a></h1>

                <!-- main nav -->
                <nav id="nav">
            <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
            </nav>
            </header>

       <?php wp_head(); ?>
然后,
footer.php

<footer id="footer">
            <div class="footer-holder">
                <div class="container">
                    <div class="case">
                        <!-- contact -->
                        <div class="contact">
                            <section class="contact-holder">
                                <h4>Get in Touch</h4>
                                <dl>
                                    <dt>Telephone:</dt>
                                    <dd>+1 800 603 6035</dd>
                                    <dt>Fax:</dt>
                                    <dd>+1 800 889 9898</dd>
                                    <dt>E-mail:</dt>
                                    <dd><a 
href="mailto:contact@vycdc.com">contact@vycdc.com</a></dd>
                                </dl>
                                <address>9870St Vincent Place, <br >Glasgow, DC 45 Fr 
45.</address>
                            </section>
<div class="add">
                    <div class="case">
                        <strong class="copyright">&copy;  
Copyright 2012 sdfr Development Centre. All rights reserved.</strong>
                        <nav class="add-nav">
                            <ul>
                                <li><a href="#">Sitemap</a></li>
                                <li><a href="#">Terms of use</a></li>
                                <li><a href="#">Privacy policy</a></li>
                            </ul>
                        </nav>
                    </div>
                </div>
            </div>
        </footer>
    </div>
</div>  
</body>
</html>

联系
电话:
+1 800 603 6035
传真:
+1 800 889 9898
电邮:

  • 然后,在Wordpress中,转到
    页面->添加新的
    。在标题中输入Home,在右侧您将看到模板。单击下拉列表并选择accordion,然后单击发布按钮

    现在,单击网站或博客名称的左上角查看幻灯片

    <footer id="footer">
                <div class="footer-holder">
                    <div class="container">
                        <div class="case">
                            <!-- contact -->
                            <div class="contact">
                                <section class="contact-holder">
                                    <h4>Get in Touch</h4>
                                    <dl>
                                        <dt>Telephone:</dt>
                                        <dd>+1 800 603 6035</dd>
                                        <dt>Fax:</dt>
                                        <dd>+1 800 889 9898</dd>
                                        <dt>E-mail:</dt>
                                        <dd><a 
    href="mailto:contact@vycdc.com">contact@vycdc.com</a></dd>
                                    </dl>
                                    <address>9870St Vincent Place, <br >Glasgow, DC 45 Fr 
    45.</address>
                                </section>
    <div class="add">
                        <div class="case">
                            <strong class="copyright">&copy;  
    Copyright 2012 sdfr Development Centre. All rights reserved.</strong>
                            <nav class="add-nav">
                                <ul>
                                    <li><a href="#">Sitemap</a></li>
                                    <li><a href="#">Terms of use</a></li>
                                    <li><a href="#">Privacy policy</a></li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
    </div>  
    </body>
    </html>