Title: PHP &amp;&amp;?
Last modified: August 20, 2016

---

# PHP &&?

 *  [ianbee](https://wordpress.org/support/users/ianbee/)
 * (@ianbee)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/)
 * 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

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177819)
 * Why not check if the attachment is of a certain MIME?
 *  Thread Starter [ianbee](https://wordpress.org/support/users/ianbee/)
 * (@ianbee)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177821)
 * [@jose](https://wordpress.org/support/users/jose/) Castaneda Thx so much for 
   the reply bro, I appreciate it!
 * Here is the code that is calling the post entry summary…
 *     ```
       <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       	<?php do_action('muimedia_entry_title'); ?>
   
       	<?php do_action('muimedia_post_before_entry_content'); ?>
   
       	<?php do_action('muimedia_post_entry_summary'); ?>
   
       	<?php do_action('muimedia_post_after_entry_content'); ?>
       </div>
       ```
   
 * To be honest, I have no idea what MIME’s are and I dont know if that would help
   to be honest. 🙁
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177828)
 * The file extension in simple terms. You can run a quick test and if it returns
   true then use the_content otherwise use the_excerpt
 *  Thread Starter [ianbee](https://wordpress.org/support/users/ianbee/)
 * (@ianbee)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177831)
 * [@jose](https://wordpress.org/support/users/jose/) Castaneda I was just looking
   for a quick php code fix to get the_content to only show under one page (the 
   video category page).
 * Right now I have
 *     ```
       /* muimedia_post_entry_summary video page */
       if ( !function_exists( 'muimedia_post_entry_summary' ) && is_category( 'videos' )  ) {
       	 function muimedia_post_video_entry_summary() {
       		?>
       ```
   
 * But it is not working. If you really think running “a quick test” will fix this
   problem, please tell me where and how I can run this test 🙂
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177835)
 * Sorry, totally misread that but even so it still is pretty quick it sounds like.
   If you have category-video.php you can use the_content instead. Try that. 🙂
 *  Thread Starter [ianbee](https://wordpress.org/support/users/ianbee/)
 * (@ianbee)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177839)
 * It’s all good… if anyone else could help me on this issue, that would be g-reeeeeeeeeat!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP &&?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [ianbee](https://wordpress.org/support/users/ianbee/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/php-13/#post-3177839)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
