• I want 1 post to show on the screen when clicking a page, without the title. Because i want to use wordpress as a cms.
    Therefore i tried to modify the loop.

    The beginning of the loop first looked like:

    <?php
    while ( have_posts() ) : the_post();
    ?>

    This shows the post header (“home”) and content (“this is the home page”) on the screen.
    I only want the content so i changed it to:

    <?php
    while ( have_posts() ) : the_content();
    ?>

    Now i see 20 or 30 post beneath eachother. All containing only the header “home” .
    So i look it up in the codex:
    https://codex.www.ads-software.com/Function_Reference/the_post
    And i modified the example a bit:

    <?php
    while ( have_posts() ) : the_post();
    	the_content();
    ?>

    Now i just see one post on the screen, but it looks like this:

    _____________________________________
    This is the home page
    HOME

    This is the home page
    _______________________________________

    Does anyone know what is going on and how i can get just the content as an output.
    ___________________________________________________
    This is the home page
    ____________________________________________________

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Showing just content on the screen’ is closed to new replies.