• Hi, haven’t set up our site yet but before we do we’re wanting to know what we can and can’t do before we get there to avoid backpedelling.

    We would like to have a home page that has one column dedicated to site navigation, one dedicated to user posts, poems, vids, images ect, and have a 3rd column dedicated to news posts, was wondering if this is possible. Can we set posts to appear in the separate columns based on their content?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes you can do this using categories. Add posts to a “poems” category according to their content. Then you can use wp_query and custom loops to output just that category’s posts.

    For example,

    <?php $my_query = new WP_Query('category_name=poems&showposts=10'); ?>
    
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
      <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    <?php endwhile; ?>

    You can also create custom queries from posts belonging to other taxonomies, such as tags.

    Here’s some more info on loops.

    Thread Starter cheezeburger

    (@cheezeburger)

    Sweet, i was tossing up whether it would be based on tags or categories but both gives me a lot more wiggle room, was thinking of using different variables other than content type to define the categories. Thanks for the help ??

    A big difference between tags and categories is that categories can show up in your URL as in https://www.yourwordpressblog.com/poems/this-is-my-poem/ with fancy permalinks. A rule of thumb is to use one or two categories per post as your taxonomy and then use tags as extra descriptors of the content. You’re welcome and good luck!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dedicated News Column’ is closed to new replies.