Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter cfheinen

    (@cfheinen)

    Thanks for the help flamenco! Turns out it was permissions issues with the font folders. The files were returning 403 (Forbidden) and causing the problem. After adjusting the permissions everything worked just fine! Hope this helps someone down the road.

    Thread Starter cfheinen

    (@cfheinen)

    Success!!! Thank you all for your help! Alchymyth your conditional statements using get_adjacent_post did the trick.

    If you want to see the end result, go down to the end of this post and check out the previous/next links. You guys rock!

    http://www.heinencreative.com/archives/articles/iui-vs-jqtouch/

    Thread Starter cfheinen

    (@cfheinen)

    Didn’t quite work, the following code returned the two else statements and previous_post_link. It should have returned my custom link or nothing if there was no next/previous page.

    <div class="navigation clearfix">
    
    									<?php if(previous_post_link() != "") : ?>
    	<?php $previous_post = get_previous_post();?>
    	<?php $gallery = get_post_meta($previous_post->ID, 'Thumbnail', $single = true); ?>
    	<?php $title = $previous_post->post_title; ?>
    	<?php $link = get_permalink( $previous_post->ID ); ?>
            <p class="left" ><a href="<?php echo $link ?>" class="screenshot" title="" rel="<?php echo $gallery ?>"><?php echo $title ?></a></p>
    									<?php else : ?>
    	<p class="left">it worked on the left</p>
    	<?php endif; ?>
    
    									<?php if(next_post_link() != "") : ?>
    	<?php $next_post = get_next_post(); ?>
    	<?php $gallery = get_post_meta($next_post->ID, 'Thumbnail', $single = true); ?>
    	<?php $title = $next_post->post_title; ?>
    	<?php $link = get_permalink( $next_post->ID ); ?>
            <p class="right" ><a href="<?php echo $link ?>" class="screenshot" title="" rel="<?php echo $gallery ?>"><?php echo $title ?></a></p>
    									<?php else : ?>
    	<p class="right">it worked on the right</p>
    	<?php endif; ?>
    
    </div>

    Am I writing my if statement wrong?

    <?php if(previous_post_link() != "") : ?>
        Do X
    <?php else : ?>
        Do Y
    <?php endif; ?>
    Thread Starter cfheinen

    (@cfheinen)

    It was for single.php, let me give that a try. Thanks!

    Thread Starter cfheinen

    (@cfheinen)

    Thanks for the quick response! I tried using get_next_posts_link() in the conditional but it goes to the else regardless of whether there is a link or not. I am probably writing the wrong syntax. What do you think?

    <div class="navigation clearfix">
    
    									<?php if(get_previous_posts_link()) : ?>
    										<?php $previous_post = get_previous_post();?>
    										<?php $gallery = get_post_meta($previous_post->ID, 'Thumbnail', $single = true); ?>
    										<?php $title = $previous_post->post_title; ?>
    										<?php $link = get_permalink( $previous_post->ID ); ?>
    										<p class="left" ><a href="<?php echo $link ?>" class="screenshot" title="" rel="<?php echo $gallery ?>"><?php echo $title ?></a></p>
    									<?php else : ?>
    										<p class="left">it worked on the left</p>
    									<?php endif; ?>
    
    									<?php if(get_next_posts_link()) : ?>
    										<?php $next_post = get_next_post(); ?>
    										<?php $gallery = get_post_meta($next_post->ID, 'Thumbnail', $single = true); ?>
    										<?php $title = $next_post->post_title; ?>
    										<?php $link = get_permalink( $next_post->ID ); ?>
    
    										<p class="right" ><a href="<?php echo $link ?>" class="screenshot" title="" rel="<?php echo $gallery ?>"><?php echo $title ?></a></p>
    
    									<?php else : ?>
    										<p class="right">it worked on the right</p>
    									<?php endif; ?>
    
    								</div>

    I elaborate further on how to use jQuery to solve this problem on my blog.

    http://www.heinencreative.com/archives/tutorials/ascendant-css-styling/

    One solution is through the use of JQuery’s :has selector. It will allow you to look for paragraphs that contain <img>. This should do the trick:

    $(“p:has(img)”).css(‘margin’ , ‘0’);

    Check out this link for more info.

    http://docs.jquery.com/Selectors/has#selector

Viewing 7 replies - 1 through 7 (of 7 total)