cfheinen
Forum Replies Created
-
Forum: Themes and Templates
In reply to: @font-face works on local but not on remoteThanks 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.
Forum: Fixing WordPress
In reply to: Conditional to see if there is a next or previous postSuccess!!! 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/
Forum: Fixing WordPress
In reply to: Conditional to see if there is a next or previous postDidn’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; ?>Forum: Fixing WordPress
In reply to: Conditional to see if there is a next or previous postIt was for single.php, let me give that a try. Thanks!
Forum: Fixing WordPress
In reply to: Conditional to see if there is a next or previous postThanks 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>Forum: Fixing WordPress
In reply to: Remove P tags from imagesI elaborate further on how to use jQuery to solve this problem on my blog.
http://www.heinencreative.com/archives/tutorials/ascendant-css-styling/
Forum: Fixing WordPress
In reply to: Remove P tags from imagesOne 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.