olafg1
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?Yeah, thanks for all your help, man. Really, thanks. I wonder why the lead image won’t print the image for the first post.
Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?Thank you so much!
I’m trying to simplify it a bit, so that you would only have one image custom field. This is what I changed:
http://wordpress.pastebin.ca/1500307
I changed lead_image and secondary_image to image, image contains an url to the image itself, as you can see here: http://dev.olafg.com/shop/
It will not print the lead_image
Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?The only thing I need help with is the grid thing, to be able to display it as I showed above:
index.php:
http://wordpress.pastebin.ca/1500267
functions.php
http://wordpress.pastebin.ca/1500268EDIT: Also, what do I need to do to make it only display posts from one category?
Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?I tried wihtout styling them first, to see that it would print at all, when I refresh I only get a blank page, and this is a code in index.php
<?php echo ( is_first_post($post->ID) ) ? 'main-post-bg' : 'secondary-post-bg left'; ?> <?php if ( is_first_post($post->ID) ) $img_src = get_post_meta($post->ID, 'lead_image', true); else $img_src = get_post_meta($post->ID, 'secondary_image', true); if ( $img_src == '' ) $img_src = '/wp-content/themes/casey/images/theunstandard-blank.png'; ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"> <?php if ( is_first_post($post->ID) ) { ?> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img_src; ?>&w=593&h=225&zc=1" width="593" height="225" /> <?php } else { ?> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img_src; ?>&w=293&h=150&zc=1" width="293" height="150" /> <?php } ?> </a> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <?php endwhile; ?> <?php else : ?> <?php endif; ?>Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?Thanks, but it seems like this is way over my head….
I tried altering the code to my own needs, copying it straight over from the theme but I still can’t make it work…
Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?The code is way to complicated to bring over to another theme. Is there no simpler way of doing this?
Forum: Themes and Templates
In reply to: Featured posts? Multiple loops?Thank you very much! I will look into the code:D