PHP &&?
-
Right now, I made my whole wordpress blog display the_excerpt instead of the_content. But, I would like it to show the_content only on the video category page. Right now in the content.php files it grabs the extension “muimedia_post_entry_summary”. In my content extensions php file here is the code for the entry summary.
/* muimedia_post_entry_summary */ if ( !function_exists( 'muimedia_post_entry_summary' ) ) { function muimedia_post_entry_summary() { ?> <div class="entry-summary"> <?php if (has_post_thumbnail()){ ?> <a href="<?php the_permalink() ?>" title="<?php the_title_attribute( array('before' => esc_attr__( 'Permalink: ', 'muimedia' ), 'after' => '')); ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a> <?php } ?> <div id="categorysummary"> <?php the_excerpt(); ?> </div> </div> <?php } }
This code gets each post’s thumbnail and excerpt.. and I’m trying to get it to show the content ONLY on the videos category page. I tried the following:
/* muimedia_post_entry_summary video page */ if ( !function_exists( 'muimedia_post_entry_summary' ) && is_category( 'videos' ) ) { function muimedia_post_video_entry_summary() { ?> <div class="entry-content"> <?php the_content(); ?> </div> <?php } }
As you can see I tried the && is_category, I also tired || is_category and also replacing the category name with it’s ID. I don’t really know what else to do ?? If anyone could help me on this small issue it would meann soooo sooo much to me! It really would. As for right now I will be off my computer. But, I will make my return to my computer within the next 30 mins.. Hopefully YOU will have the right solution! ?? lolll
- The topic ‘PHP &&?’ is closed to new replies.