WP Only Showing 1 Post on Main Page

Discussion in 'WordPress' started by jhmattern, Aug 20, 2006.

  1. #1
    In the settings, I tell it to show up to 10 posts on blog pages though. I don't see other settings anywhere. When I switch to a default template, it works fine. When I put it on the one I downloaded and edited, it doesn't work. Any ideas as to what I probably did to screw it up? :( The blog is at http://blog.bizammo.com

    Jenn
     
    jhmattern, Aug 20, 2006 IP
  2. iowadawg

    iowadawg Prominent Member

    Messages:
    10,918
    Likes Received:
    811
    Best Answers:
    0
    Trophy Points:
    380
    #2
    The template package you are using.
    COuld be in one of the files it has a default of one post and needs to be changed.
     
    iowadawg, Aug 20, 2006 IP
  3. DarrenC

    DarrenC Peon

    Messages:
    3,386
    Likes Received:
    154
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Jenn, check the index.php file - the code should be in the loop, if it's not I think it can get confused and only display one post.
     
    DarrenC, Aug 20, 2006 IP
  4. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #4
    I didn't make any changes to the code in this particular file, so is there a chance another template file might have done it if I changed something wrong? Sorry. I'm completely clueless on this, and this is only the first day I'm even attempting to play with it. I'll include the code for the index.php file. If something jumps out, would you be so kind as to let me know? I didn't see anything that make me think it was dealing with post counts... but then again, like I said, I'm pretty lost on this.

    Thanks.

    Jenn

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    
    <!-- main content area-->
    		<div class="content"> 
    <?php if (have_posts()) : ?>
    		
    	<?php while (have_posts()) : the_post(); ?>
    			
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
    			<small><img src="<?php bloginfo('stylesheet_directory'); ?>/images/timeicon.gif" alt="" /> <?php the_time('F jS, Y') ?> by <img src="<?php bloginfo('stylesheet_directory'); ?>/images/author.gif" alt="" /> <?php the_author() ?> </small>
    
    			
    			<div class="entry">
    				<?php the_content('Read the rest of this entry &raquo;'); ?>
    			</div>
    	
    	
    			<p class="info">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?>  <img src="<?php bloginfo('stylesheet_directory'); ?>/images/comments.gif" alt="" /> <?php comments_popup_link('No Comments &raquo;', '1 Comment &raquo;', '% Comments &raquo;'); ?></p>
    		</div>
          <div style="visibility: hidden;"><a href="http://businessbroker.bizmp.com/businessbroker.html">Business Broker</a>
    	<?php comments_template(); ?>
    	<?php endwhile; ?>
    
    		<p align="center"><?php next_posts_link('&laquo; Previous Entries') ?>   <?php previous_posts_link('Next Entries &raquo;') ?></p>
    
    	<?php else : ?>
    		<h2 align="center">Not Found</h2>
    		<p align="center">Sorry, but you are looking for something that isn't here.</p>
    	<?php endif; ?>
    
    
    		</div>
    		<br />
    <?php get_footer(); ?>
    
    
    </body>
    </html>
    Code (markup):
     
    jhmattern, Aug 20, 2006 IP
  5. DarrenC

    DarrenC Peon

    Messages:
    3,386
    Likes Received:
    154
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Jenn, I'm not a PHP expert, or a WP theme expert neither, but PM Colleen, and I am sure she won't mind taking a quick look at it. :) (sorry Colleen hehe)
     
    DarrenC, Aug 20, 2006 IP
  6. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #6
    Thank you. I PMd her. :)
     
    jhmattern, Aug 20, 2006 IP
  7. alexisthemovie

    alexisthemovie Peon

    Messages:
    698
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i'll take a look

    edit: okay, i just looked in your source and found your theme called in-business.

    http://blog.bizammo.com/wp-content/themes/in-business/

    if you go there, you'll see that it's missing the index.php file, or rather, it's missing an important portion of it.

    now take a look at this,

    http://blog.bizammo.com/wp-content/themes/in-business/home.php

    it's exactly what your blog is currently showing.

    what this means is that the theme purposely only shows the "latest post" layout. the index.php file can only and must be overridden by a home.php file for the query_posts and posts_per_page perameters to work.

    find the home.php file and look for something like this,
    
    <?php
    get_header();
    query_posts('posts_per_page=1');
    ?>
    
    Code (markup):
    and change the number to your liking.
     
    alexisthemovie, Aug 20, 2006 IP
  8. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #8
    Thanks. I just checked, and unfortunately there isn't any file called home.php with this theme I downloaded, or with anything else in my WP folder on the server. Would I need to create one? If so, would anything need to be there other than what you mentioned? I'm sorry for being so clueless about this. I just wouldn't be surprised if it was something incredibly simple that I managed to screw up.

    Jenn
     
    jhmattern, Aug 20, 2006 IP
  9. alexisthemovie

    alexisthemovie Peon

    Messages:
    698
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i'm gonna download the theme now and take a look. i'll post back with what i find.
     
    alexisthemovie, Aug 20, 2006 IP
  10. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #10
    Thank you. I really appreciate it. :)
     
    jhmattern, Aug 20, 2006 IP
  11. alexisthemovie

    alexisthemovie Peon

    Messages:
    698
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #11
    alexisthemovie, Aug 20, 2006 IP
  12. alexisthemovie

    alexisthemovie Peon

    Messages:
    698
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #12
    k i just compared the default index.php with yours with digitalpoint's compare tool.

    in your code, it looks like you tried to place a link with the anchor "business broker."

    <a href="http://businessbroker.bizmp.com/businessbroker.html">Business Broker</a>
    Code (markup):
    well, searching the page in firefox comes up with nothing and it looks like your theme is missing the footer as well when compared with mine.

    http://alexisthemovie.com/wordpress/

    the problem is, you forgot to close the div that you opened seen here,

    <div style="visibility: hidden;"><a href="http://businessbroker.bizmp.com/businessbroker.html">Business Broker</a>
    Code (markup):
    just place this after it,

    </div>
    Code (markup):
    and you should be good to go.
     
    alexisthemovie, Aug 20, 2006 IP
  13. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #13
    That's a link put in by the theme author... I remembered seeing it because of changing a spelling error before re-pasting the original earlier, but seriously, I never would have caught that after staring at this stuff for the last 16 or so hours. (not just the blog... but still... too much). That officially makes you my favorite person for the day. :) Thank you so much.. and for pointing out the comparison tool. I hadn't seen that before. :) It's working just fine and dandy now.

    Jenn
     
    jhmattern, Aug 20, 2006 IP
  14. alexisthemovie

    alexisthemovie Peon

    Messages:
    698
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #14
    happy to help :)
     
    alexisthemovie, Aug 20, 2006 IP
    jhmattern likes this.