• Okay. Each page shows posts in a certain category using The Loop. I use query_posts() to filter which category to show using The Loop. Here’s the issue: on the Index (front) page, it’ll show a preview of the post but on any of the Pages the preview is blank. I use the exact same Loop that’s on the Index page, except for query_posts(), but I don’t think it makes a difference. Can anyone provide any insight? The URL is http://www.bizness-geek.com

    Here’s a copy of the code for the Pages:

    <?php
    if (is_page(‘About’)) {
    query_posts(“cat=1”);
    }
    elseif (is_page(‘Business News’)) {
    query_posts(“cat=3”);
    }
    elseif (is_page(‘Entrepreneurship’)) {
    query_posts(“cat=4”);
    }
    elseif (is_page(‘Life & Money’)) {
    query_posts(“cat=5”);
    }
    elseif (is_page(‘Investing’)) {
    query_posts(“cat=6”);
    }
    elseif (is_page(‘Marketing & Advertising’)) {
    query_posts(“cat=7”);
    }
    elseif (is_page(‘Economics’)) {
    query_posts(“cat=8”);
    }
    elseif (is_page(‘Real Estate’)) {
    query_posts(“cat=9”);
    }
    elseif (is_page(‘Profiles’)) {
    query_posts(“cat=10”);
    }
    ?>

    //THE LOOP
    <?php if (have_posts()) : $odd = true; ?>
    <div id=”mini-post-wrap” class=”clearfix”>
    <?php while (have_posts()) : the_post(); ?>
    <div id=”post-<?php the_ID(); ?>” class=”mini-post<?php if ($odd) : echo ‘ odd’; else : echo ‘ even’; endif; ?>”>
    <h3 class=”title”>” title=”<?php the_title(); ?>”><?php the_title(); ?></h3>
    <div class=”meta clearfix”>
    <span class=”date-post icon”><?php the_time(‘F j Y’) ?></span> ” title=”Leave your comment”><?php comments_number(‘No Commented’,’one Commented’,’% Commented’); ?>
    </div>

    //CODE USED TO SHOW CONTENT PREVIEW…ALREADY TRIED the_content()
    <div class=”entry”>
    <?php the_content_rss(”, TRUE, ”, 50); ?>
    </div>
    ” title=”Continue Reading…”>Continue Reading…
    </div>

The topic ‘Coding Issue’ is closed to new replies.