2011-11-23 37 views
0

所以我在转换http://www.benjaminpotter.org/fleet/ 到WordPress>工作在我的第一个WordPress站点...WordPress作为CMS,要求内容发行

我有一个去http://www.benjaminpotter.org/test/

所以已经有几问题,但其中一件事是,我想通过wordpress将索引页面上的“关于我们”部分的内容称为CMS。

这是后端的图像:

enter image description here

但它在这一节中没有内容结束:

enter image description here

这是最有可能的,因为我需要将一些代码放入网站的页面中。

这是该页面的当前代码,并且我已经评论了我想调用内容mannaged位的位置......感谢您的帮助!

<? /* 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(); ?> 
+0

我正好熟悉的WordPress软件,但我想你必须在源头上挖过来找出WordPress的是如何断定哪些元素来写。这看起来像静态副本,但是,您是否想过只需手动添加它? – worc

回答

1
<?php echo get_content(); ?> 

或者

<?php 
global $post; 
echo $post->post_content; 
?> 
+0

get_content()没有工作,与get_the_content()...不知道为什么。第二种方法的工作原理...但似乎是一种古老的方法,也忽略了一些在wordpress CMS中的格式。任何其他想法? –

+0

global $ post; the_content($ post-> ID); –

0

我认为你需要用你打电话the_content()在WordPress循环

<?php 
if (have_posts()) { 
    while (have_posts()) { 
     the_content(); 
    } // end while 
} // end if 
?> 

这是一个非常简单的例子,如果你做其他呼叫稍后您将需要在此之后重置查询呼叫。

更多的信息在这里:https://codex.wordpress.org/The_Loop