WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] One of my static pages appears in excerpt form (5 posts)

  1. libprep
    Member
    Posted 2 years ago #

    Hi there,

    I've found another person with a similar problem, but the cause was different. I can't figure out what's wrong. Here's the page in question:

    http://www.libertarianprepper.com/libertarianism/

    If I click "read more" it simply goes to the same page. All my other static pages (on the left side) appear just as intended.

    I'm obviously missing something, so any help would be greatly appreciated!

  2. Kapil Chugh
    Member
    Posted 2 years ago #

    Please post code of your index.php file of your activated theme.

  3. libprep
    Member
    Posted 2 years ago #

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package Sunspot
     * @since Sunspot 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary" class="site-content">
    			<div id="content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						 */
    						get_template_part( 'content', get_post_format() );
    					?>
    
    				<?php endwhile; ?>
    
    				<?php sunspot_content_nav( 'nav-below' ); ?>
    
    			<?php elseif ( current_user_can( 'edit_posts' ) ) : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'No posts to display', 'sunspot' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'sunspot' ), admin_url( 'post-new.php' ) ); ?></p>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary .site-content -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Here it is. Hope it helps!

  4. jnhghy
    Member
    Posted 2 years ago #

    I don't think this is a code issue... check your post content make sure it is correct, if it is... you can delete the post and do it again, other posts work fine so this might be an permalink issue (if you have duplicated posts) or if you at somepoint made database changes ... recreating the posts should fix this.
    Regards

  5. libprep
    Member
    Posted 2 years ago #

    You were right! Deleting and re-creating the post solved the problem. Thanks very much :)

Topic Closed

This topic has been closed to new replies.

About this Topic