我是PHP新手,我有以下问题,我正在开发这个WordPress问题:http://onofri.org/WP_BootStrap/
正如你所看到的,我的博客(名为Hello Wordl的博客)上有一篇独特的帖子,但下面没有显示我的其他主题。
这是页面的代码,您可以在显示的帖子下看到许多其他静态信息:
<?php get_header(); ?>
<!-- Contenuti (griglia) -->
<div class="container">
<!-- Lead presentazione -->
<section id="presentazione">
<div class="row">
<div class="col-sm-12">
<h1 class="text-center"><small>Lorem ipsum dolor sit amet</small></h1>
<p class="lead text-center">
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...
</p>
</div><!-- /.col-sm-12 -->
</div><!-- /.row -->
</section><!-- /section presentazione -->
<!-- Progetti in evidenza -->
<section id="lancio-progetti">
<div class="row">
<div class="col-sm-4">
<div class="box-progetto">
<h3>Lorem ipsum sit dolor</h3>
<p class="text-center"><img src="/wordpress/wp-content/themes/AsperTheme/assets/img/pencil-1.jpg" class="img-thumbnail img-responsive">
</p>
<p>
Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
</p>
<a href="#" class="btn btn-primary btn-large btn-block"><span class="glyphicon glyphicon-shopping-cart"></span> Acquista il pacchetto</a>
</div>
</div><!-- /.col-sm-4 -->
<div class="col-sm-4">
<div class="box-progetto">
<h3>Lorem ipsum sit dolor</h3>
<p class="text-center"><img src="/wordpress/wp-content/themes/AsperTheme/assets/img/pencil-2.jpg" class="img-thumbnail img-responsive">
</p>
<p>
Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
</p>
<a href="#" class="btn btn-primary btn-large btn-block"><span class="glyphicon glyphicon-shopping-cart"></span> Acquista il pacchetto</a>
</div>
</div><!-- /.col-sm-4 -->
<div class="col-sm-4">
<div class="box-progetto">
<h3>Lorem ipsum sit dolor</h3>
<p class="text-center"><img src="/wordpress/wp-content/themes/AsperTheme/assets/img/pencil-3.jpg" class="img-thumbnail img-responsive">
</p>
<p>
Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
</p>
<a href="#" class="btn btn-primary btn-large btn-block"><span class="glyphicon glyphicon-shopping-cart"></span> Acquista il pacchetto</a>
</div>
</div><!-- /.col-sm-4 -->
</div><!-- /.row -->
</section><!-- /section lancio progetti-->
<!-- SEZIONE IN CUI VENGONO VISUALIZZATI I POST DEL BLOG: -->
<section id="blog-posts">
<?php
if ( have_posts() ) :
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( \'content\', get_post_format() );
endwhile;
// Previous/next post navigation.
twentyfourteen_paging_nav();
else :
// If no content, include the "No posts found" template.
get_template_part( \'content\', \'none\' );
endif;
?>
<header class="header-sezione">
<h2>Ultimi Articoli</h2>
</header>
<article>
<header>
<time datetime="2010-11-10" pubdate>
10/11/2010
</time>
<h3>FIRST POST TITLE</h3>
</header>
<p>
POSTS CONTENT
</p>
<footer class= "posts_footer">
<address>
<a href="mailto:[email protected]">MY NAME</a>
</address>
</footer>
</article>
</section>
<section id="ultimi-lavori">
<header class="header-sezione">
<h2>Ultimi lavori</h2>
</header>
<div class="row">
<div class="col-sm-7">
<div class="box-lavoro-evidenza">
<h3>Il nuovo sito di HTML.it</h3>
<p>
Donec id elit non mi porta gravida at <a href="#">eget metus id elit mi</a> egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
</p>
<p>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus etiam sem...
</p>
<p>
Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, <a href="#">tellus ac cursus</a> comodo egetine metuss gorp.
</p>
<blockquote>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
</p>
<small>Marco Rossi <cite title="Source Title">Direttore Marketing</cite></small>
</blockquote>
</div>
</div><!-- /.col-sm-7 -->
<div class="col-sm-5">
<div class="box-lavoro-evidenza">
<img src="assets/img/work-1.jpg" class="img-thumbnail img-responsive">
</div>
</div><!-- /.col-sm-5 -->
</div><!-- /.row -->
<div class="row">
<div class="col-xs-6 col-sm-3">
<div class="box-progetto">
<h4 class="text-center">Lorem.com</h4>
<a href="assets/img/fancybox/pretty-1.jpg" title="Il nuovo sito di Lorem.com" class="fancybox thumbnail img-responsive"><img src="assets/img/fancybox/pretty-1-th.jpg" alt="Il nuovo sito di Lorem.com"></a>
<p class="text-center">
Click per ingrandire
</p>
</div>
</div><!-- /.col-sm-3 -->
<div class="col-xs-6 col-sm-3">
<div class="box-progetto">
<h4 class="text-center">Lorem.com</h4>
<a href="assets/img/fancybox/pretty-2.jpg" title="Il nuovo sito di Lorem.com" class="fancybox thumbnail img-responsive"><img src="assets/img/fancybox/pretty-2-th.jpg" alt="Il nuovo sito di Lorem.com"></a>
<p class="text-center">
Click per ingrandire
</p>
</div>
</div><!-- /.col-sm-3 -->
<div class="col-xs-6 col-sm-3">
<div class="box-progetto">
<h4 class="text-center">Lorem.com</h4>
<a href="assets/img/fancybox/pretty-3.jpg" title="Il nuovo sito di Lorem.com" class="fancybox thumbnail img-responsive"><img src="assets/img/fancybox/pretty-3-th.jpg" alt="Il nuovo sito di Lorem.com"></a>
<p class="text-center">
Click per ingrandire
</p>
</div>
</div><!-- /.col-sm-3 -->
<div class="col-xs-6 col-sm-3">
<div class="box-progetto">
<h4 class="text-center">Lorem.com</h4>
<a href="assets/img/fancybox/pretty-4.jpg" title="Il nuovo sito di Lorem.com" class="fancybox thumbnail img-responsive"><img src="assets/img/fancybox/pretty-4-th.jpg" alt="Il nuovo sito di Lorem.com"></a>
<p class="text-center">
Click per ingrandire
</p>
</div>
</div><!-- /.col-sm-3 -->
</div><!-- /.row -->
</section><!-- /section ultimi lavori -->
<!-- Notizie e aggiornamenti -->
<section id="news">
<header class="header-sezione">
<h2>News e aggiornamenti</h2>
</header>
<div class="row">
<div class="col-sm-5">
<div id="segnalazioni-carousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<div class="panel-carousel">
<div class="panel-carousel-heading">
<h4>Lorem ipsum</h4>
</div>
<div class="panel-carousel-body">
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
</div>
<div class="panel-carousel-footer">
<p>
<a href="#">Leggi tutta la news</a>
</p>
</div>
</div>
</div>
<div class="item">
<div class="panel-carousel">
<div class="panel-carousel-heading">
<h4>Lorem ipsum</h4>
</div>
<div class="panel-carousel-body">
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
</div>
<div class="panel-carousel-footer">
<p>
<a href="#">Leggi tutta la news</a>
</p>
</div>
</div>
</div>
<div class="item">
<div class="panel-carousel">
<div class="panel-carousel-heading">
<h4>Lorem ipsum</h4>
</div>
<div class="panel-carousel-body">
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
</div>
<div class="panel-carousel-footer">
<p>
<a href="#">Leggi tutta la news</a>
</p>
</div>
</div>
</div>
</div>
<div class="panel-carousel-nav">
<p class="text-right">
<a class="panel-carousel-control" href="#segnalazioni-carousel" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a>
<a class="panel-carousel-control" href="#segnalazioni-carousel" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a>
</p>
</div>
</div>
</div><!-- /.col-sm-5 -->
<div class="col-sm-7">
<div id="segnalazioni-tab">
<ul class="nav nav-tabs">
<li class="active">
<a href="#tab-1" data-toggle="tab">Lorem ipsum</a>
</li>
<li>
<a href="#tab-2" data-toggle="tab">Sit dolor</a>
</li>
<li>
<a href="#tab-3" data-toggle="tab">Adipiscing nunc</a>
</li>
<li>
<a href="#tab-4" data-toggle="tab">Condimentum diam</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-1">
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
</div>
<div class="tab-pane" id="tab-2">
<p>
Donec id elit non mi porta gravida at <a href="#">eget metus id elit mi</a> egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
</p>
<p>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus etiam sem...
</p>
<p>
Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, <a href="#">tellus ac cursus</a> comodo egetine metuss gorp.
</p>
</div>
<div class="tab-pane" id="tab-3">
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.
</p>
<p>
Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.
</p>
</div>
<div class="tab-pane" id="tab-4">
<p>
Donec id elit non mi porta gravida at <a href="#">eget metus id elit mi</a> egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
</p>
<p>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus etiam sem...
</p>
<p>
Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, <a href="#">tellus ac cursus</a> comodo egetine metuss gorp.
</p>
</div>
</div>
</div>
</div><!-- /.col-sm-7 -->
</div><!-- /.row -->
<!-- Tabelle prezzi -->
<section id="servizi">
<header class="header-sezione">
<h2>Servizi e offerte</h2>
</header>
<div class="row">
<div class="col-sm-4">
<ul class="list-group servizi">
<li class="list-group-item servizi-titolo">
<h4>Opzione Free</h4>
</li>
<li class="list-group-item servizi-prezzo">
<strong>Gratuito</strong>
</li>
<li class="list-group-item servizi-opzione">
Dapibus ac facilisis in
</li>
<li class="list-group-item servizi-opzione">
Morbi leo risus
</li>
<li class="list-group-item servizi-opzione">
Porta ac consectetur ac
</li>
<li class="list-group-item servizi-opzione">
Vestibulum at eros
</li>
<li class="list-group-item servizi-footer">
<button class="btn btn-success btn-block btn-round-bottom" type="button">
Abbonati
</button>
</li>
</ul>
</div>
<div class="col-sm-4">
<ul class="list-group servizi">
<li class="list-group-item servizi-titolo">
<h4>Opzione Pro</h4>
</li>
<li class="list-group-item servizi-prezzo">
<strong>€ 5.99 al mese</strong>
</li>
<li class="list-group-item servizi-opzione">
Dapibus ac facilisis in
</li>
<li class="list-group-item servizi-opzione">
Morbi leo risus
</li>
<li class="list-group-item servizi-opzione">
Porta ac consectetur ac
</li>
<li class="list-group-item servizi-opzione">
Vestibulum at eros
</li>
<li class="list-group-item servizi-footer">
<button class="btn btn-success btn-block btn-round-bottom" type="button">
Abbonati
</button>
</li>
</ul>
</div>
<div class="col-sm-4">
<ul class="list-group servizi">
<li class="list-group-item servizi-titolo">
<h4>Opzione Super</h4>
</li>
<li class="list-group-item servizi-prezzo">
<strong>€ 9.99 al mese</strong>
</li>
<li class="list-group-item servizi-opzione">
Dapibus ac facilisis in
</li>
<li class="list-group-item servizi-opzione">
Morbi leo risus
</li>
<li class="list-group-item servizi-opzione">
Porta ac consectetur ac
</li>
<li class="list-group-item servizi-opzione">
Vestibulum at eros
</li>
<li class="list-group-item servizi-footer">
<button class="btn btn-success btn-block btn-round-bottom" type="button">
Abbonati
</button>
</li>
</ul>
</div>
</div>
</section>
</div><!-- /.container -->
<?php get_footer(); ?>
在前面的代码中,这是将我的帖子显示到主页中的部分:
<?php
if ( have_posts() ) :
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( \'content\', get_post_format() );
endwhile;
// Previous/next post navigation.
twentyfourteen_paging_nav();
else :
// If no content, include the "No posts found" template.
get_template_part( \'content\', \'none\' );
endif;
?>
但是,正如您所看到的,这个PHP代码下的所有静态内容都没有显示出来(如果我删除代码的这一部分,它工作得很好,我可以看到主题的最后一部分)
你对我如何解决这个问题有什么想法吗?我错过了什么?
Tnx公司
安德烈