父页面不显示在Wordpress网站上

时间:2013-03-18 16:22:09

标签: php wordpress

我在Wordpress(Work,Studio,CTHM​​ +)的后端制作了三个页面,但它们似乎没有出现在网站的前端:

http://www.cthm.co.uk/work/

header.php文件已被编辑,但我不确定我是否遗漏了一些重要内容。

<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>

    <script type="text/javascript" src="http://www.cthm.co.uk/wp-content/themes/child/scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="http://www.cthm.co.uk/wp-content/themes/child/scripts/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="http://www.cthm.co.uk/wp-content/themes/child/scripts/jquery.coda-slider-2.0.js"></script>

    <script type="text/javascript">
        $().ready(function() {
            $(".slider1").codaSlider({dynamicArrows: false, dynamicTabs: false} );          
            $(".slider1 .coda-nav-right-wrapper").mouseover(function(){ $(".nav1").css("display", "block"); });     
            $(".slider1 .coda-nav-right-wrapper").mouseout(function(){ $(".nav1").css("display", "none"); });
            $("#coda-nav-right-1 > a > .coda-nav-right-wrapper")
        }); 
    </script>   
</head>

    <body>

    <div id="header">

        <h1>
            <a href="http://www.cthm.co.uk/work">
                <img src="http://www.cthm.co.uk/wp-content/uploads/2013/02/logo2.png" alt="CTHM Logo" id="logo" width="140" height="44" />  
            </a>

<div id="contact-details">
26 Queen Anne Road, <br />
London, E9 7AH<br />
<a href="mailto:hello@cthm.co.uk">hello@cthm.co.uk</a>
</div>

        </h1>

    </div>

    <div id="content">

1 个答案:

答案 0 :(得分:1)

您的标题正在显示,但您的代码错误。您需要在无冲突包装器中添加脚本才能使其正常工作。如果你要添加任何类型的javascript我会考虑将它添加到functions.php部分,以便它适当地排队。

参考:http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Link_a_Theme_Script_Which_Depends_on_jQuery

如何排队脚本:http://codex.wordpress.org/Function_Reference/wp_enqueue_script

另外,如果您计划对二十二个主题进行大量更改,我还会考虑如何根据二十二个主题创建一个儿童主题 http://codex.wordpress.org/Child_Themes