1)
you seem to have some broken code in content.php in your chidl theme; please post the full code (use the pastebin as outlined in http://codex.wordpress.org/Forum_Welcome#Posting_Code )
there is also no css code to resize the images to a max width; once you have corrected the errors in the code, try to add to style.css in the child theme:
.hentry .attachment-post-thumbnail {
max-width: 97.5%; /* Fluid images for post excerpts */
}
2)
‘3’ might what you have set under dashboard – settings – reading; blog pages show at most…
to set a different number of posts per page for the home page and archives, review:
http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Changing_the_number_of_posts_per_page.2C_by_post_type
Thanks for your response alchymyth!
I have pasted my child theme in a paste bin.
Once you have a look I will input the code you gave me above.
I very much appreciate your help!
Annie
can you post the code of content.php of your child theme?
I also tried putting the code below into my style.css of my child theme and my archives are still showing 3 posts.
I tried the code from the codex link you sent verbatim but it didn’t work, so I changed it a bit and it still doesn’t work.
function hwl_home_pagesize( $query ) {
if ( is_admin() || ! $query->is_main_query() )
return;
if ( is_home() ) {
// Display only 3 post for the original blog archive
$query->set( 'posts_per_page', 1 );
return;
}
if ( is_post_type_archive ) {
$query->set( 'posts_per_page', 20 );
return;
}
}
add_action( 'pre_get_posts', 'hwl_home_pagesize', 3 );
Any suggestions? Thanks again!
please try and insert the missing opening div:
<div class="entry-summary">
directly before these lines:
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
that should hopefully remove some of the existing errors, and enable the newly to be added styles to be effective.
Hurray alchymyth!! It worked!!
I also added your other code above and now my images fit beautifully.
Ahh. So much better!
I will try to codex code to see if I can get my 10 posts showing.
Thank you!!!
Alas, the codex code did not work…
🙁
I’m sorry to ask for help again, but might you have any suggestions on how to have 3 posts on my main blog page and 10 posts on the archives, categories and search pages???
I truly appreciate your help!
try to set the number of posts per page to 10 within dashboard – settings – reading;
then add this to functions.php in the child theme:
function hwl_home_pagesize( $query ) {
if ( is_admin() || ! $query->is_main_query() )
return;
if ( is_home() ) {
// Display only 3 post for the original blog index
$query->set( 'posts_per_page', 3 );
return;
}
}
add_action( 'pre_get_posts', 'hwl_home_pagesize', 1 );
The almighty alchymyth has done it again!
The problem is fixed and the website looks perfect.
THANK YOU!
Annie