• ianbee

    (@ianbee)


    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

    (@jcastaneda)

    THEME COFFEE MONKEY

    Why not check if the attachment is of a certain MIME?

    Thread Starter ianbee

    (@ianbee)

    @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

    (@jcastaneda)

    THEME COFFEE MONKEY

    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

    (@ianbee)

    @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

    (@jcastaneda)

    THEME COFFEE MONKEY

    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

    (@ianbee)

    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.