• I’m trying to create a navigation using tags. I currently have a page that lists some artwork. I want to link those posts with tags to further divide them by medium and have a navigation, that when clicked on, will show the desired posts under that tag.

    esmi helped me out with something similar that allowed me to create multiple pages for each category here: https://varriaga.com/artwork/ using this:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('posts_per_page=12&cat=6&paged='.$paged); ?>

    I’ve looked a few things up and figured I could do it with a similar query
    query_posts(array('tag__and' => array(37,47));

    I’m just not sure where to put it and the nav text in the follwing…

    <div id="portcontent">
    	    <?php if (have_posts()) : ?>
                <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;  query_posts('posts_per_page=12&cat=6&paged='.$paged); ?>
                <?php while (have_posts()) : the_post(); ?>
                <div class="portpost">
    	    </div>
    	   <?php endwhile; ?>
    			<div id="recent-content">
    			<ul class="recent-projects-port">
                			<li>
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('posts_per_page=12&cat=6&paged='.$paged); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_option('home'); ?>/wp-content/thumbs/<?php $values = get_post_custom_values("Thumb"); echo $values[0]; ?>" alt="" /></a>
    <?php endwhile; ?>
                			</li>
                		</ul>
                		</div>
    	   <div class="port-navigation">
            	<span class="previous-entries"><?php previous_posts_link(); ?>
    </span> | <span class="next-entries"><?php next_posts_link(); ?>
    </span>
               </div>
    
               <?php else : ?>

    thanks in advance for the help!

    tags i want to use: pen and ink, digital, acrylic, etc. I want it to be a text based nav like: tag 1 | tag 2 | tag 3 : located just above the posts. (hopefully this helps.)

  • The topic ‘Navigation by Tags’ is closed to new replies.