Frontpage & The_Content() Not Displaying Formatting
-
I am trying to get my front page to display formatting and images from my news posts similar to the way a single page would, when view a news item by say clicking the read more link, rather than using the excerpt.
I replaced the_excerpt with the_content and it does display an entire post but there are no line breaks for formatting. Is this a CSS issue? a coding issue?
In single.php, when viewing a news post such as here – https://d6960386.temp202.hostica.com/?p=28 formating works
The codee in single.php reads as:
<div class="post-entry"> <?php the_content(); ?> <?php wp_link_pages('before=<span class="page-links"><strong>Pages:</strong> &after=</span>'); ?> </div>
Everything looks fine and dandy. Yet on my frontpage, which I want to display the entire the_content (entire content of a news posts) with formatting it is outputing the text of the articles with no formating
example – https://d6960386.temp202.hostica.com/
the code reads:
<div class="post-entry" id="post-<?php the_ID(); ?>"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { /* if post has a thumbnail */ ?> <div class="news-thumb-wrapper"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_post_thumbnail(); ?></a> <div class="news-arrows"></div> <h1><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1> </div> <?php } else { /* if post doesn't have a thumbnail */ ?> <h1 class="news-heading"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1> <?php } ?> <div class="news-meta-wrapper"> <span class="news-meta">By <?php the_author(); ?>, <?php the_time( get_option('date_format') ); ?></span> <span class="news-comment"><?php comments_popup_link(__('0'), __('1'), __('%')); ?></span> <span class="news-cats"><?php the_category(', ') ?></span> </div> <?php the_content(); ?> </div>
- The topic ‘Frontpage & The_Content() Not Displaying Formatting’ is closed to new replies.