我的wordpress主题没有显示任何内容

时间:2015-07-15 23:15:14

标签: php css wordpress

我刚刚激活了我的wordpress主题,现在它除了标题图片外没有显示任何内容。这是我的测试网站,你可以看到http://mythemetestingr.base.pk/

我也在分享我的代码。请帮我解决这个问题

这是我的标题php代码

http://codepad.org/E8wmFS5w

<?php
/**
 * The template for displaying the header
 *
 * Displays all of the head element and everything up until the "site-content" div.
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta name="msvalidate.01" content="F13414F64E4F7715B05751FFB81FBA09" />
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width">
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url') ?>/css/bootstrap.css">
     <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url') ?>/css/font-awesome.css">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <!--[if lt IE 9]>
    <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
    <![endif]-->
    <script>(function(){document.documentElement.className='js'})();</script>
    <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
 <header>
<section class="top_header">
<div class="container">
<div class="col-xs-12 pdding-zero">
<div class="col-md-8 padding-zero">
<ul class="list-inline top-contact">
<li><i class="fa fa-phone"></i><?php echo ot_get_option( 'phone_no' );?></a></li>
<li><i class="fa fa-mobile"></i><?php echo ot_get_option( 'phone_no_2' );?></li>
<li><a href="mailto:<?php echo ot_get_option( 'email_address' );?>"><i class="fa fa-envelope-o"></i> <?php echo ot_get_option( 'email_address' );?></a></li>
</ul>
</div><!---phone section endds--->


<div class="col-sm-4 paddng-zero text-right">
<ul class="list-inline top-contact li-pad-zero">
<li><a href="<?php echo ot_get_option( 'facebook_link' );?>" target="_blank"><i class="fa fa-facebook"></i></a></li>
<li><a href="<?php echo ot_get_option( 'google__link' );?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
<li><a href="<?php echo ot_get_option( 'twitter_link' );?>" target="_blank"><i class="fa fa-google-plus"></i></a></li>
<li><a href="<?php echo ot_get_option( 'youtube_link' );?>" target="_blank"><i class="fa  fa-youtube-play"></i></a></li>
</ul>

</div>
</div>
</div><!--container ends her--->
</section><!--top sectionends here---->

<section class="container margin-top-30">
<div class="col-xs-12 padding-zero">
<div class="col-sm-4 padding-zero logo">
<a href="<?php echo esc_url(home_url('/')) ?>"><img src="<?php echo ot_get_option( 'logo' );?>" class="img-responsive" /></a>
</div>
<div class="col-sm-4 col-sm-offset-4 padding-zero">
<figure class="call_us_figure">
<img src="<?php bloginfo('template_url') ?>/images/callus.png" class="img-responsive pull-right" />
<figcaption class="call_us_caption"><?php echo ot_get_option( 'phone_no' );?></figcaption>
</figure>
</div>
<div class="clearfix"></div>
<nav class="navbar clearfix navbar-default margin-top-10">
<div class="navbar-header">
<button class="navbar-toggle collapsed" aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>

<div id="navbar" class="collapse navbar-collapse padding-zero">
<?php

$defaults = array(
    'menu'            => 'Main Menu',
    'echo'            => true,
    'fallback_cb'     => 'wp_page_menu',
    'items_wrap'      => '<ul id="%1$s" class="nav navbar-nav">%3$s</ul>',
    'depth'           => 0,
    'walker'          => ''
);

wp_nav_menu( $defaults );

?>          </div>
</nav>
 </div>     
</section><!---logo nad menu--->

</header>
<div class="container">
<div class="col-xs-12 padding-zero">

1 个答案:

答案 0 :(得分:0)

在您的标题代码中,您有一个关闭标记,但第35行没有开放标记。

<li><i class="fa fa-phone"></i><?php echo ot_get_option( 'phone_no' );?></a></li>

摆脱这个标签或打开一个。

这可能不是唯一的问题,但肯定有帮助。