Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sugar_man

    (@sugar_man)

    I’ve RESOLVED it.

    Basically I found a function called query_posts(). What this does is directly query the database for particular posts or pages, and using The Loop and Template Tags, can retrieve specific records, in the example below the title and content. Full details of using this function, including the conditions you can place like ‘posts per page’ can be found on the User:JamesVL/query posts codex article.

    Example:

    <?php query_posts('cat=4'); ?>
      <?php if (have_posts()) : while (have_posts()) : the_post();?>
      <p class="header">
      <?php the_title();?>
      </p>
      <?php the_content() ?>
      <?php endwhile; else: ?>
       Sorry, there has been an error!
    Please report this to the webmaster by sending an email to [email protected]
      <?php endif; ?>

    Actual web page is http://www.nooryouthonline.com/?pg=audio

    Thread Starter sugar_man

    (@sugar_man)

    Thanks for the advice sewmyheadon. I appreciate that creating themes and templates, and using the is_home() template tag to create a static homepage is the obvious way to use WordPress as a CMS. However I’m not interested in this as I have already done all the work of creating a layout in xHTML and CSS files and do not want to rework everything all over again.

    Thus the simplest solution for me is to ‘include’ info from the WordPress database into an exterior page as you said. I guess what I’m looking for is how WordPress generates a post or page from the database (being ‘dynamic‘), and the back-end stuff behind the the_content() template tag, which in Codex is described as “the meat and potatoes of each pass through The Loop”, so I have an idea of what I can ‘include’.

Viewing 2 replies - 1 through 2 (of 2 total)