Adding Navigation to Project Single.php (6 posts)

  1. Stevie Caldarola
    Posted 3 years ago #

    Hi there,

    I'm trying (desperately) to finish a new theme and am in need of adding navigation links (Prev | Next) to single.php project posts for a portfolio section of the website.


    I've added in the following code:

    <span class="alignRight"><id ="navigation"><?php previous_post_link('%link', 'Prev', TRUE); ?>
    | <?php next_post_link('%link', 'Next', TRUE); ?></span></div>

    As you can see, only the "|" is showing up. The links will not show for some reason.

    Any ideas?

    Stevie Caldarola

  2. sethotron
    Posted 3 years ago #

    Just off the top of my head it looks like you have an error in your tags right here:

    class="alignRight"><id ="navigation">

    Those >< might be throwing it off...

  3. Stevie Caldarola
    Posted 3 years ago #

    Thanks- I took them out, but the links still aren't showing.

  4. sethotron
    Posted 3 years ago #

    huh..thats weird. are you doing anything in the header that might be throwing the loop off? saw this:

  5. Stevie Caldarola
    Posted 3 years ago #

    Header code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang='en'>
        <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
        <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/reset.css" type="text/css">
        <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css">
        <!--[if IE]>
        <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" type="text/css" />
        <body class="home blog">
        <div id="nav-bar-tile">
    	<div id="nav-bar-content">
    	<a href="http://www.brewspook.com"> <img src="http://brewspook.com/wp-content/uploads/2012/02/logo.png"> </a>
    	<div id="nav-bar-links" class="nav-bar-links"><a href="http://www.brewspook.com/approach/" title="Approach">Approach</a> |	<a href="http://www.brewspook.com/portfolio" title="Portfolio">Portfolio</a> | <a href="http://www.brewspook.com/contact" title="Contact">Contact</a> </div>
    	</div><!-- nav-bar-content -->
    	</div><!-- nav-bar-tile -->
    	<div id="wrapper">
            <div id="content">
  6. Stevie Caldarola
    Posted 3 years ago #

    Could it be something from the Portfolio gallery base page?

    <div class="post">
                    $loop = new WP_Query(array('post_type' => 'project', 'posts_per_page' => -1));
                    $count =0;
                <div id="portfolio-wrapper">
                    <ul id="portfolio-list">  
                    <?php if ( $loop ) :   
                        while ( $loop->have_posts() ) : $loop->the_post(); ?>  
                            $terms = get_the_terms( $post->ID, 'tagportfolio' );  
                            if ( $terms && ! is_wp_error( $terms ) ) :
                                $links = array();  
                                foreach ( $terms as $term )
                                    $links[] = $term->name;
                                $links = str_replace(' ', '-', $links);
                                $tax = join( " ", $links );
                            else :
                                $tax = '';
                            <?php $infos = get_post_custom_values('_url'); ?>  
                            <li class="portfolio-item <?php echo strtolower($tax); ?> all">
                                <div class="thumb"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array(400, 160) ); ?></a></div>
                                <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>  
                        <?php endwhile; else: ?>

Topic Closed

This topic has been closed to new replies.

About this Topic