Reputation: 2835
i'm fetching posts in home page like this
<?php
if ( have_posts() ) :
// Start the Loop.
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() );
endwhile;
twentyfourteen_paging_nav();
else :
get_template_part( 'content', 'none' );
endif;
?>
<?php // get_sidebar( 'content' ); ?>
it prints post but also prints this message before posts :
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){?>
‘ . ‘Read More’.’ ‘; ?>
see attached screenshot for output of post
Upvotes: 1
Views: 43
Reputation: 263
Learn how to search the theme folder and search for the code that is problematic. If you don't need it delete it, if you do need it use correct php.
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){?>
‘ . ‘Read More’.’ ‘; ?>
The problem is it is printing the code as text because it is not using the php opening tag
Upvotes: 1