ThemeShaper Forums » Thematic

[closed]

Navigation won't show up in video posts

(3 posts)
  • Started 3 years ago by astima
  • Latest reply from astima
  • This topic is not resolved
  1. astima
    Member

    If I have a regular post (without a video) my navigation appears i.e. http://www.stimadesigns.com/ctc/?p=939
    however, if I have a post with video my navigation does not appear i.e. http://www.stimadesigns.com/ctc/?p=930
    I know it has something to do with the code in the single post loop, but I'm not sure what I am doing wrong. Here is the code I am currently using:

    function gallery_single_post() {
      global $post;
    
    	if(function_exists('file_get_contents')){
        $shortenedurl = file_get_contents('http://tinyurl.com/api-create.php?url=' . urlencode(get_permalink())); 
    
    	} else {
    
    		$shortenedurl = urlencode(get_permalink());
    
    	}
    
    		?>
    
    			<div id="post-<?php the_ID(); ?>" class="<?php
    
    			thematic_post_class(); 
    
    			if(function_exists('p75GetVideo')){
    
    		    if(p75GetVideo($post->ID)){ 
    
    				  echo " video";
    
    					$video = 1;
    
    				}
    
    			}
    
    			?>">
    
    			  <div class="entry-content">
    			    <?php if(function_exists('the_ratings')) { echo the_ratings(); } ?>
    
    			    <h1><?php the_title(); ?></h1>
    
    				<?php the_content(''.__('Read More <span class="meta-nav">&raquo;</span>', 'thematic').''); ?>
    				<ul class="meta">
    
    				  <?php if(get_post_meta($post->ID, 'designed-by')){ ?><li class="designer">Designed by: <?php echo get_post_meta($post->ID, 'designed-by', $single = true); ?></li><?php } ?>
    
    				  <?php if(get_post_meta($post->ID, 'web-url')){ ?>
    
    					  <li class="site-link"><a rel="source" href="<?php echo get_post_meta($post->ID, 'web-url', $single = true); ?>"><?php echo get_post_meta($post->ID, 'web-url', $single = true); ?></a></li>
    					  <li class="delicious"><a href="http://del.icio.us/post?url=<?php echo get_post_meta($post->ID, 'web-url', $single = true); ?>&amp;<?php the_title(); ?>">Bookmark This (<?php echo get_post_meta($post->ID, 'web-url', $single = true); ?>)</a></li>
    
    					  <li class="twitter"><a href="http://www.twitter.com/home?status=<?php echo str_replace(' ', '+', the_title_attribute('echo=0')); echo '+' . $shortenedurl; echo "+(via+@mixcss)"; ?>" title="Share <?php the_title_attribute(); ?> on Twitter">Tweet This</a></li>
    
    				  <?php } ?>
    				</ul>
    			    <div id="nav-below" class="navigation">
    <div class="nav-next"><?php next_post_link('%link', '<span class="meta-nav">&laquo;</span> Previous', TRUE); ?></div>
    			      <div class="nav-previous"><?php previous_post_link('%link', 'Next <span class="meta-nav">&raquo;</span>',TRUE); ?></div>
    
    			    </div>
    
    			  </div>
    
    			</div><!-- .post -->
    
    			<div class="artwork-container">
    
    			  <div class="entry-artwork">
    
              <?php if($video==1) {echo p75GetVideo($post->ID); }
    					      else{ ?>
    
    							<?php if(get_post_meta($post->ID, 'web-url')){ ?>
                        <a href="<?php echo get_post_meta($post->ID, 'web-url', $single = true); ?>"><img src="<?php if(get_post_meta($post->ID, 'full-image')){echo get_post_meta($post->ID, 'full-image', $single = true);}else{bloginfo('url'); echo '/wp-content/themes/gallery/images/full-image-default.jpg';} ?>" alt="<?php echo get_post_meta($post->ID, 'web-url', $single = true); ?>"/></a>
    
                  <?php }else{ ?>
    
                        <img src="<?php if(get_post_meta($post->ID, 'full-image')){echo get_post_meta($post->ID, 'full-image', $single = true);}else{echo '/wp-content/themes/gallery/images/full-image-default.jpg';} ?>" alt="<?php echo get_post_meta($post->ID, 'web-url', $single = true); ?>"/>
    
    							<?php } ?>
    
                <?php }?>
    
    			  </div>
    
    			</div>
    <?php
    
    }
    
    add_action('thematic_singlepost', 'gallery_single_post');
    // End of SINGLE

    I can't figure out why this code doesn't work. If someone could explain what I am doing wrong I would really appreciate it.

    Posted 3 years ago #
  2. middlesister
    Member

    I don't think there is anything wrong with your code. If you look at the page in firebug, you can see that the navigation is hidden with css. Remove the declaration

    .single div.video #nav-below { display:none;}

    from style.css. BTW, glad to see things starting to work for you!

    Posted 3 years ago #
  3. astima
    Member

    Thanks. I'm really starting to get the swing of things. I've learned a lot from these forums, they have been a great help.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.