![]() |
Wordpress: single.php doesn't display the_content() - Printable Version +- 0Day Forums (https://0day.red) +-- Forum: Coding (https://0day.red/Forum-Coding) +--- Forum: CMS (https://0day.red/Forum-CMS) +---- Forum: WordPress (https://0day.red/Forum-WordPress) +---- Thread: Wordpress: single.php doesn't display the_content() (/Thread-Wordpress-single-php-doesn-39-t-display-the-content) |
Wordpress: single.php doesn't display the_content() - kareeabizbnk - 07-26-2023 I'm creating a custom Wordpress Theme and I can't seem to get the single.php template to work. Below is the code I have written. The title comes up but the content doesn't. Any Ideas why it isn't? <?php /** * The Template for displaying all single posts. */ get_header(); ?> <div id="content" role="main"> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content(); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> </div><!-- #content --> <?php get_footer(); ?> See here for a screenshot of the output: ![enter image description here][1] [1]: |