• Excellent plugin — I was trying to customize it though to show the post excerpts. I tried using the_excerpt and get_the_excerpt. Both situations resulted in [empty] displaying where the excerpt should be.

    Is this for some reason not possible to do?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • To show the post excerpts, first you should add “post_excerpt” to the database query (line 218) and then add “$post->post_excerpt” to the html output (line 288).

    Thread Starter johnny_n

    (@johnny_n)

    Thank you, @daninabil, that does the trick. Only works with posts that have manual excerpts generated — I believe this is because it’s outside the loop and we can’t use get_the_excerpt, but something in the back of my mind says it could be a theme issue — but this definitely works.

    In case someone wants to use excerpts, here are the mods I used:

    Line 218:

    // A direct query is used instead of get_posts() for memory reasons
    		$rawposts = $wpdb->get_results( "SELECT ID, post_date, post_date_gmt, post_excerpt, comment_status, comment_count FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_password = ''" );

    Instead of modifying line 288, I modified line 295 (for visual/style reasons):

    $html .= ' <br /><p style="padding-left:15px;">' . $post->post_excerpt . "</li>\n";

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Clean Archives Reloaded] Adding excerpt to archives’ is closed to new replies.