the_excerpt & the_content

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 10 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10264 Reply

    I’m testing out your plugin to figure out which event plugin I want to use for a few sites. I’ve written a custom loop (once using eo_get_events and another using wp_query). In both instances I am unable to use the_excerpt or the_content to display the events content. Oddly enough echo get_the_content() works just fine in both loops, but echo get_the_excerpt() does not. I have Excerpts checked in settings as a supported feature for Events. Any ideas on why this would be happening?

    Here is the code:

    <?php
    //Get upcoming '
    $args = array(
        'numberposts'=>3,
        'event_start_after'=>'today',
        'showpastevents'=>true,
        'post_type'=>'event',
        'suppress_filters'=>false
    );
    
    $eventloop = new WP_Query( $args );
        if ( $eventloop->have_posts() ) :?>
        
      <?php while ( $eventloop->have_posts() ) : $eventloop->the_post(); ?>
    • '> <h5><?php the_title(); ?></h5> on <?php eo_the_start('jS F Y'); ?>

      <?php the_excerpt(); ?>

    • <?php endwhile; wp_reset_postdata(); ?>
    <?php else : echo 'No Upcoming Events'; endif; ?>
    Josh
    #10276 Reply

    Hi Josh,

    They should both work find. Also, the_content() is little more than echo get_the_content(), so if one works, then so should the other. If you have any further questions about this, please use the support forums, as this forum is intended for pre-sales questions.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: the_excerpt & the_content
Your information:




To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax


<a href="" title="" rel=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width=""> <p style=""> <span style="">