Update index.php for 2.0.0

- Keep the existing structure and the_content().
- Escape the author URL.
- Remove the commented out category output and the commented out
  rss-feed.php include.
- Guard the RSS shortcode with shortcode_exists().
This commit is contained in:
ai-bot committed 2026-10-14 08:34:20 +00:00
1 parent 01029a9777
commit 8da0fd652f
1 file changed
+15 -11
+15 -11
View File
@@ -1,29 +1,33 @@
<?php <?php
/**
* Blog index and front page template.
*
* @package Super_Simple_WP_Theme
*/
get_header(); get_header();
if (have_posts()) : if ( have_posts() ) :
while (have_posts()) : the_post(); while ( have_posts() ) :
?> the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="entry-meta"> <div class="entry-meta">
<p class="author"><a href="<?php echo get_author_posts_url(get_the_author_meta("ID")); ?>"><?php the_author(); ?></a></p> <p class="author"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php the_author(); ?></a></p>
<p class="date"><?php the_date(); ?></p> <p class="date"><?php the_date(); ?></p>
</div> </div>
<div class="entry-content"> <div class="entry-content">
<?php the_content(); ?> <?php the_content(); ?>
<!--<p class="categories"><?php the_category(", "); ?></p>-->
</div> </div>
</article> </article>
<?php <?php
endwhile; endwhile;
endif; endif;
//include get_template_directory() . '/rss-feed.php'; // The RSS plugin prints the raw shortcode when it is deactivated.
echo do_shortcode('[super_simple_rssreader]'); if ( shortcode_exists( 'super_simple_rssreader' ) ) {
echo do_shortcode( '[super_simple_rssreader]' );
}
get_footer(); get_footer();
?>