WordPress.org

Ready to get started?Download WordPress

Forums

Show article tags on main index? (2 posts)

  1. laddo
    Member
    Posted 4 years ago #

    Hi guys, this is somewhat of a tough request.

    Here's what im trying to do... I want to display articles tagged with a certain tag on my main index? Is this possible? I need to be able to change the tag periodically (even if manually by editing main index).

    Thanks if you can help!

    Matt

  2. MichaelH
    Member
    Posted 4 years ago #

    That can be done. For example using the WordPress Default theme, in the wp-content/themes/default/index.php file, change:

    <?php if (have_posts()) : ?>

    to this:

    <?php
    query_posts($query_string . '&tag=tag1');
    ?>
    
    <?php if (have_posts()) : ?>

    Of course, change tag1 to your tag.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.