WordPress beginner

Out of context: Reply #12

  • Started
  • Last post
  • 19 Responses
  • dee-dubs0

    got a wordpress question. I made the following loop on a custom theme:

    <?php
    if (have_posts()) :
    while (have_posts()) : the_post(); ?>
    <?php if ( in_category( '4' ) ) : ?>
    <article class="post">
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    <p class="bodyDate"><?php echo get_the_date(); ?></p>
    <p><?php echo get_the_excerpt(); ?><br></p>
    </article>
    <?php endif; ?>
    <?php endwhile;
    else :
    echo '<p>No content found</p>';
    endif;
    ?>

    for some reason it only shows posts made within the last 80 days, ie if it is a date in aug or before it doesnt show....is something wrong with my loop or is there a hidden setting in WP i'm missing.

    I have tried google and found nowt so far.....

    • Probably something hidden. I've spent so much time searching code before for this sort of thing. If the theme itself doesn't have settings for this...mg33
    • You could start looking through various pages and just search for "80." It's tedious but you just might find it.mg33
    • ^ I made the theme myself from scratch so i'm pretty sure its not something i've added in theredee-dubs
    • ...but in saying that, switching to another WP theme doesn't have the same issue... so has to be something wrong with my codedee-dubs
    • Dumb question... but does the site have posts older than 80 days?mg33
    • yes, i played around with publish date as older posts weren't showing, seems 80 days is cut off... or aug 21st..dee-dubs
    • You doing anything with pagination in your theme that would differ from the other theme that shows them all?ETM
    • not added any pagination in yet as only 6 posts (WP set to show 10)dee-dubs
    • added pagination links in and the older one shows on separate page, really odddee-dubs

View thread