• Resolved satori6

    (@satori6)


    Hi all,

    I am using the Grungezine theme, which is a 3 column magazine style theme. The very left column is programed to show every post I create, while the others to the right of it allow me define the category which they will display. However, this leads to each post showing up twice: once in the column that I want it to and once in the “home-entry” column. I want to define a category for this main column as well, but when I mess with the code, the whole site disappears.

    Here is what the PHP looks like there: (at least I think this is the relevant part)

    <div class=”home-entry”>
    <h2>What’s New</h2>

    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>

    <h1>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h1>

    This is what it looks like in the other column (where I defined category 4):

    <div class=”news”>
    <h2>Upcoming Events</h2>
    <div class=”news-entry”>
    <?php $my_query = new WP_Query(‘showposts=4&cat=4’);
    while ($my_query->have_posts()) : $my_query->the_post();
    if ( $post->ID == $do_not_duplicate ) continue;
    update_post_caches($posts);
    $do_not_duplicate = $post->ID; ?>

    Is it possible to change this? I want to have 3 different subject columns.

    The site is: https://www.sattya.org/sattya

    Sorry if this is a ridiculous question or if I am forgetting some vital info. It’s my first time delving into the world of programming (if that’s what this is.

    Thank you. Your help is very much appreciated.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP: Not display all posts on front page’ is closed to new replies.