• Resolved mhains

    (@mhains)


    Can someone throw some code my way?

    I’m trying to display the posts on my main page a different way depending on whether or not there’s an excerpt.

    I’ve been using the_excerpt_reloaded but if it encounters an excerpt, it’s not adding the “more” link.

    So I’m hoping you can help.

    Here’s how I need it to go:

    IF excerpt THEN
    use it
    ELSE
    use content
    END IF

    Hope you can help,
    Michael

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mhains

    (@mhains)

    Found myself a solution. Category 10 is my “Features” category:

    <?php if ( in_category('10') ){ ?>
    
       <?php the_excerpt(); ?><a href="<?php the_permalink(); ?>"><small>Full Story</small></a>
    
    <?php } else { ?>
    
       <?php the_excerpt_reloaded(100, '<a><small><blockquote><br><strong><img>','content',TRUE, '<small>Full Story</small>',TRUE,2,TRUE); ?>
    
    <?php } ?>

    Pretty cool stuff. Thanks, mhains.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘IF excerpt THEN use it ELSE use content?’ is closed to new replies.