Ben Potter
Ben Potter

Reputation: 875

Wordpress as a CMS, calling content Issue

So I am working on my first wordpress site...

I am having a go at converting http://www.benjaminpotter.org/fleet/ to wordpress > http://www.benjaminpotter.org/test/

So there are already a few issues, but one of the things is that I am wanting to call content into the "about us" section on the index page via wordpress to act as a CMS.

This is an image of the back end:

enter image description here

nevertheless it ends up with no content in that section:

enter image description here

this is most likely because I need to put in a bit of code into the page of the website.

This is the current code for that page, and I have commented where I want to call the content mannaged bit... thanks for the help!

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

Upvotes: 0

Views: 169

Answers (2)

Chris A
Chris A

Reputation: 36

i believe you need to wrap you call to the_content() in the Wordpress loop

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

this is a very basic example if you make other calls later you will need to reset the query call after this one.

more info here: https://codex.wordpress.org/The_Loop

Upvotes: 0

Leo Jiang
Leo Jiang

Reputation: 26075

<?php echo get_content(); ?>

Or

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

Upvotes: 1

Related Questions