Help with If/eEsle statement please?
-
Hi there,
I have the following 2 statments working, but I want to make it so that it can use either (a gallery, or a featured image) and I have no idea how to do that..I would like it to work as follows;
If a value for “galleryID” exists, then display:
<?php $galleryID="galleryID"; echo do_shortcode('[jj-ngg-jquery-cycle gallery="'.get_post_meta($post->ID, $galleryID, true).'" width="220" height="150"]'); ?>else, if a ‘Featured Image’ exists, display;
<a href="<?php $PageURL="PageURL"; echo get_post_meta($post->ID, $PageURL, true); ?>" title="<?php the_title(); ?>"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'home-feature', array( 'title' => '', 'alt' => '' ) ); } else { echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/no-img.gif" width="220" height="150" alt="' . the_title() .'" />'; }?> </a>can anyone please help me achieve this?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Help with If/eEsle statement please?’ is closed to new replies.