Questions about sorting by category on a static HTML page
-
So I never ever like to ask for help with code, I prefer just to figure it out myself… After a few weeks, I’m stumped.
I have an HTML website that uses a WordPress blog. We have four sections on the index.php page that need to be populated by small excerpts from different categories.
There is a News and Events category, and then three topic categories (Social Media, Blogs, etc. etc)
The code that I’m using is —
<?php require('blog/wp-blog-header.php'); ?> <?php query_posts('cat=8&posts_per_page=6'); ?> <?php while (have_posts()) : the_post(); ?> <img src="images/img_1.gif" alt="pisture" border="0" class="floated" /><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><strong><?php the_title(); ?></strong><?php the_excerpt(); ?></a><br /> <?php endwhile;?>
Somehow I deduced that my “category ID” was 8. I don’t think that is true anymore. I can’t find any how-tos, guides, or anything that will tell you how to find Category IDs anymore. The techniques “hover your mouse over… ” etc don’t seem to work anymore and it no longer shows up on the HTML byline.
I know this is really, really, really, really, simple, but can I divide up my index.php so that it pulls content for the four separate sections from the four separate categories? And how do I find the category IDs to use in the sorting?
Sorry, I know this is a repost but I can’t find it, and if I have found it then I don’t understand it.
THANKS!
- The topic ‘Questions about sorting by category on a static HTML page’ is closed to new replies.