0

我在 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">
4

1 回答 1

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

于 2013-03-18T16:34:02.047 回答