Mini Loop outside wordpress directory
-
Hi,
I have seen the codex page https://codex.www.ads-software.com/The_Loop_in_Action#Excerpts_Only
and I think this is what I need….
I have static page outside the wordpress directory e.g.
RESOURCES index.html WORDPRESS
so that I can get a small excerpt about 100 words on the static index page, I seen this code..
<?php if (have_posts()) : ?> <?php if (($wp_query->post_count) > 1) : ?> <?php while (have_posts()) : the_post(); ?> <!-- Do your post header stuff here for excerpts--> <?php the_excerpt() ?> <!-- Do your post footer stuff here for excerpts--> <?php endwhile; ?> <?php else : ?> <?php while (have_posts()) : the_post(); ?> <!-- Do your post header stuff here for single post--> <?php the_content() ?> <!-- Do your post footer stuff here for single post--> <?php endwhile; ?> <?php endif; ?> <?php else : ?> <!-- Stuff to do if there are no posts--> <?php endif; ?>
but this is my output..
post_count) > 1) : ?>
what part of the code could I change so that I see a snippet of the latest blog entry? I was wnating this to be constantly changing as and when new content is uploaded.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Mini Loop outside wordpress directory’ is closed to new replies.