nomdeck
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Thumbnail by Custom Field vs Thumbnail by attached image?bump. any help por favor?
Forum: Fixing WordPress
In reply to: Thumbnail by Custom Field vs Thumbnail by attached image?here is what I have so far…half works. Only deteching custom field but no attachment URL
<?php if ( get_post_meta($post->ID, "Thumbnail", true)) { ?> <img class="thumb_left" src="<?php echo get_post_meta($post->ID, "Thumbnail", true);?>" /> <?php } elseif ( wp_get_attachment_url( $post_ID )) { ?> <img class="thumb_left" src="<?php wp_get_attachment_url( $post_ID );?>" /> <?php } ?>any ideas folks?
Forum: Fixing WordPress
In reply to: Using conditional tags to vary loop in sidebar?GOT IT. THANKS
Forum: Fixing WordPress
In reply to: Using conditional tags to vary loop in sidebar?you mean something lik this?
doesn’t seem to work for me :/
man i need to learn some PHP…<?php if ( is_page('baseball') ) { ?> // custom loop for baseball <?php query_posts('category_name=baseball'); <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a style="font-weight:bold;color:blue;" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><br /> <?php the_excerpt(); ?></li> <?php endwhile; ?><?php endif; ?> <?php } elseif ( is_page('football') ) { ?> // custom loop for Football <?php query_posts('category_name=football'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a>" title="<?php the_title(); ?>"><?php the_title(); ?></a> <?php the_excerpt(); ?></li> <?php endwhile; ?><?php endif; ?> <?php }Forum: Fixing WordPress
In reply to: Using conditional tags to vary loop in sidebar?still confused and assignment due soon. 🙁 please help
Forum: Fixing WordPress
In reply to: Using conditional tags to vary loop in sidebar?bump. anyone?
Forum: Fixing WordPress
In reply to: Using conditional tags to vary loop in sidebar?Hi David, sorry one more question. 🙂 So i thought I had it and rushed home but because i’m so new to php,it looks somewhat ugly.
So here is what I have for one example:
I copy pasted the custom loop so i’m not sure what i need in there and i don’t need…
Thanks again in advance!<?php if ( is_page('baseball') ) { // custom loop for baseball <?php query_posts('category_name=baseball'); <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a style="font-weight:bold;color:blue;" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><br /> <?php the_excerpt(); ?></li> <?php endwhile; ?><?php endif; ?> } elseif ( is_page('football') ) { // custom loop for Football <?php query_posts('category_name=football'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a>" title="<?php the_title(); ?>"><?php the_title(); ?></a> <?php the_excerpt(); ?></li> <?php endwhile; ?><?php endif; ?>Forum: Fixing WordPress
In reply to: Using conditional tags to vary loop in sidebar?Thanks David. funny enough, right after i posted my question, I found out what I was doing wrong.
Insrtead of using “is_page” i was using “is_category” and of course the page doesn’t have a category, thus it wasn’t working.
I feel stupid now. 🙂
anyway, thanks again!