2011-11-23 24 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