Php Wordpress作为CMS,调用内容问题
所以我在我的第一个wordpress网站上工作 我正在尝试转换 到wordpress> 所以已经有一些问题了,但其中一个问题是,我想通过wordpress将内容调用到索引页面的“关于我们”部分,作为CMS 这是后端的图像: 然而,该节中没有任何内容: 这很可能是因为我需要在网站的页面中输入一些代码 这是该页面的当前代码,我已经在我想调用内容的地方发表了评论。。。谢谢你的帮助Php Wordpress作为CMS,调用内容问题,php,html,css,wordpress,Php,Html,Css,Wordpress,所以我在我的第一个wordpress网站上工作 我正在尝试转换 到wordpress> 所以已经有一些问题了,但其中一个问题是,我想通过wordpress将内容调用到索引页面的“关于我们”部分,作为CMS 这是后端的图像: 然而,该节中没有任何内容: 这很可能是因为我需要在网站的页面中输入一些代码 这是该页面的当前代码,我已经在我想调用内容的地方发表了评论。。。谢谢你的帮助 <? /* Template Name: Home Page */ ?> <?php get_h
<? /* Template Name: Home Page
*/ ?>
<?php get_header(); ?>
<div id="tagline"></div>
<div id="sliderbox">
<img src="<?php bloginfo('template_url'); ?>/images/index/slider/slider_1.jpg" width="1000" height="466" alt="Don't settle for less" />
<img src="<?php bloginfo('template_url'); ?>/images/index/slider/slider_2.jpg" width="1000" height="466" alt="Don't settle for less" />
<img src="<?php bloginfo('template_url'); ?>/images/index/slider/slider_3.jpg" width="1000" height="466" alt="Don't settle for less" />
<img src="<?php bloginfo('template_url'); ?>/images/index/slider/slider_4.jpg" width="1000" height="466" alt="Don't settle for less" />
</div>
<a id="arrow2" class="arrow"></a>
<a id="arrow1" class="arrow"></a>
<a href="order.php" id="car_logo_slider" onmouseover="tooltip.show('');" onmouseout="tooltip.hide();">
<img src="<?php bloginfo('template_url'); ?>/images/index/car_slider/cars1.jpg" width="1001" height="86" alt="cars" />
<img src="<?php bloginfo('template_url'); ?>/images/index/car_slider/cars2.jpg" width="1001" height="86" alt="cars" />
<img src="<?php bloginfo('template_url'); ?>/images/index/car_slider/cars3.jpg" width="1001" height="86" alt="cars" />
</a>
<div id="wrapper-contunue">
<div id="mission_vision_header"></div>
<? include('inc/quickcontact.html'); ?>
<div id="mission_vision_text">
<!-- THE CONTENT MANAGED BIT! -->
<!-- THE CONTENT MANAGED BIT! -->
<!-- THE CONTENT MANAGED BIT! -->
<!-- THE CONTENT MANAGED BIT! -->
<!-- THE CONTENT MANAGED BIT! -->
</div>
<div style="margin-top:450px;" class="seperator"></div>
<div id="our_process" class="highlighed_div">
<div id="our_process_header"></div>
<div id="initial_text_our_process">
Here at Fleet Avenue, we have a simple and straight forward process towards acquiring our cars for you. This four step process is fast and effective, consisting of the following steps:
</div>
<div id="our_process_stages_graphic"></div>
<div id="explanatiory_text_our_process">
<div id="process_inquire">
<a id="inquire_button" href="order.php"></a>
</div>
</div> <?php get_footer(); ?>
/图像/index/slider/slider_1.jpg“width=“1000”height=“466”alt=“不要满足于更少”/>
/图像/索引/滑块/滑块2.jpg“width=“1000”height=“466”alt=“不要满足于更少”/>
/图像/index/slider/slider_3.jpg“width=“1000”height=“466”alt=“不要满足于更少”/>
/图像/index/slider/slider_4.jpg“width=“1000”height=“466”alt=“不要满足于更少”/>
在Fleet Avenue,我们有一个简单而直接的流程为您购买我们的汽车。该四步流程快速有效,包括以下步骤:
或
我认为您需要将对\u content()的调用包装到Wordpress循环中
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_content();
} // end while
} // end if
?>
这是一个非常基本的示例,如果您稍后进行其他调用,则需要在此调用之后重置查询调用
这里的更多信息:我对Wordpress软件非常熟悉,但我想您必须在源代码中挖掘,以了解Wordpress如何确定要写入哪些元素。不过,这看起来像是静态副本,您是否考虑过手动添加它?get_content()和get_the_content()都不起作用。。。不知道为什么。第二种方法有效。。。但这似乎是一个古老的方法,也忽略了wordpress CMS中的一些格式。还有其他想法吗?全球$post;_内容($post->ID);
<?php
global $post;
echo $post->post_content;
?>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_content();
} // end while
} // end if
?>