• Resolved luvleyl

    (@luvleyl)


    When adding a new post, the post over writes the exsisting post instead of creating a summary. The settings are set to only show 5 posts on the blog page and the summary toggle button is selected. The page the posts should be listed on is accurately targeted. And the posts show on the page but only the most recent post displays. How can I get the posts to show up as listing instead of only the most recent post in it’s entirety. I have added ‘read more’ tags to them as well.

    This is the blog.php code I’m using, please let me know if there’s another set of code needed. The site I’m referring too is beinspiredmarketing.com

    <div id="primary">
    			<div id="content" role="main">
    
                                   <!-- Start the Loop. -->
     <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
     <!-- The following tests if the current post is in category 3. -->
     <!-- If it is, the div box is given the CSS class "post-cat-three". -->
     <!-- Otherwise, the div box will be given the CSS class "post". -->
     <?php if ( in_category('3') ) { ?>
               <div class="post-cat-three">
     <?php } else { ?>
               <div class="post">
     <?php } ?>
    
     <!-- Display the Title as a link to the Post's permalink. -->
     <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
     <!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
     <small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
    
     <!-- Display the Post's Content in a div box. -->
     <div class="entry">
       <?php the_content(); ?>
     </div>
    
     <!-- Display a comma separated list of the Post's Categories. -->
     <p class="postmetadata">Posted in <?php the_category(', '); ?></p>
     </div> <!-- closes the first div box -->
    
     <!-- Stop The Loop (but note the "else:" - see next line). -->
     <?php endwhile; else: ?>
    
     <!-- The very first "if" tested to see if there were any Posts to -->
     <!-- display.  This "else" part tells what do if there weren't any. -->
     <p>Sorry, no posts matched your criteria.</p>
    
     <!-- REALLY stop The Loop. -->
     <?php endif; ?>
    
    				<!--to make this global paste into footer.php under footer ID-->
    				<?php wp_dequeue_function( get_sidebar( 'footer' ) ) ?>
    			</div><!-- #content -->
    		</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • the ‘be blog’ page would probably be using index.php –

    blog.php is not a template name which would automatically get used within the template hierarchy; https://codex.www.ads-software.com/Template_Hierarchy

    what is the code in index.php?

    Thread Starter luvleyl

    (@luvleyl)

    Ok, the index.php code is below and below that is the child template main.php code

    Index.php Code

    <?php
    /**
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    function wp_additional_css()
    {
    wp_enqueue_style( ' style' , WP_CONTENT_DIR . ' /themes/960.css' );
    wp_enqueue_style(  'style' , WP_CONTENT_DIR . ' /themes/screen. css' );
    }
    add_action( ' wp_enqueue_scripts' , ' wp_additional_css' );
    
    get_header(); ?>
    
    <!--Main content section-->
      <div id="primary">
    
         <div id="content" role="main">
    
    	<?php the_post(); ?>
    
    	<?php get_template_part( 'content', 'page' ); ?>
    
          </div><!-- #content -->
    
        </div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    
    <footer id="colophon" role="contentinfo">
    
            <?php
                /* A sidebar in the footer */
                get_sidebar( 'footer' );
            ?>
    
    </footer><!-- #colophon -->
    <?php get_footer(); ?>

    **************************************
    Child Template Main.php Code

    <?php
    function wp_additional_css()
    {
    wp_enqueue_style( ' style' , WP_CONTENT_DIR . ' /themes/960.css' );
    wp_enqueue_style(  'style' , WP_CONTENT_DIR . ' /themes/screen. css' );
    }
    add_action( ' wp_enqueue_scripts' , ' wp_additional_css' );
    
    get_header(); ?>
    
        <div id="primary">
           <div id="content" role="main">
    
    	  <?php the_post(); ?>
    
    	  <?php get_template_part( 'content', 'page' ); ?>
    
    	</div><!-- #content -->
    
        </div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Thread Starter luvleyl

    (@luvleyl)

    Thank you for your help! I just figured out the loop!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘posts not summarizing on blog page’ is closed to new replies.