Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions functions/jf-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Return the excerpt of the post, unless the read more element is used
// Output of both versions will be the same: one <p> with content and one <p> with the more link
function jf_read_more_excerpt( ) {
function jf_read_more_excerpt( $post ) {
$content = get_the_content();

if( strpos( $content, '#more-' ) ) {
Expand Down Expand Up @@ -32,4 +32,4 @@ function jf_add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
add_option( "{$name}_size_h", $height, '', 'yes' );
add_option( "{$name}_crop", ((int) $crop), '', 'yes' );
}
}
}
6 changes: 3 additions & 3 deletions templates/content/archive.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
<?php
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class() ?>>
<?php jf_read_more_excerpt(); ?>
<?php jf_read_more_excerpt( $post ); ?>
</div>
<?php
endwhile;
endif;
endif;