Forums

adding to the loop (5 posts)

  1. 4ycr
    Member
    Posted 2 years ago #

    I am wanting to use wp as a CMS with static homepage and about 20 other static categories but also have a blog and news sections. These sections will be just like blogs but will only display the relevant information. After much searching I have found that it can be done using http://codex.wordpress.org/Template_Tags/query_posts but that is as far as my knowledge goes. I do not know where to add the code, where to find category Id's, what code I should use.

    <?php get_header(); ?>
    <div class="art-contentLayout">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?><div class="art-content">
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    //Do I need to add the code here????
    <div class="art-Post">
        <div class="art-Post-body">
    <div class="art-Post-inner art-article">

    what query string would I need to add

    Thanks and if anyone could make it an idiot guide, it would be very helpful

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

  3. 4ycr
    Member
    Posted 2 years ago #

    thanks but apart from saving the file, what else do I need to do

  4. MichaelH
    Volunteer
    Posted 2 years ago #

    The answer "what else do I need to do " is somewhat involved and requirs a bit on understanding of Page Template, the Template Hierarchy, and Templates.

    Might look at using one of these plugins that offer either a shortcode or placemarker to include posts when you write the pages

    # http://wordpress.org/extend/plugins/postlists/
    # http://wordpress.org/extend/plugins/list-category-posts/
    # http://wordpress.org/extend/plugins/simple-posts-list/

  5. 4ycr
    Member
    Posted 2 years ago #

    thanks, it looks like it will be a bit too much for me. I will need to get someone to do this for me.

Topic Closed

This topic has been closed to new replies.

About this Topic