Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

Different # of posts shown on front page, "Page 2" (older entries), etc.


  #1  
Old Nov 23, 2010, 03:06 PM
bswb97
 
158 posts · Aug 2010
This seems like it should be really simple, but I have a site's blog on the home page. Client wants only one post shown on the home page AND the sidebar only on the home page.

For the home page, I used the Custom Post Limits plugin and set the front page to 1. Unfortunately, when you go to the older entries (Page 2, Page 3, etc.), each of these pages only shows a single post.

Also, the sidebar shows up on all of these pages, but obviously not other pages or single posts.

One area of Atahualpa I haven't messed with much is the Archives feature. I know you can create a list archive, but can you create one with excerpts? That will work too.
  #2  
Old Nov 23, 2010, 03:24 PM
bswb97
 
158 posts · Aug 2010
I suppose the easy way to get it to look how I want is the way it displays when you click on a category page. Is there a way to create a general archive page that shows X number of posts that way?
  #3  
Old Nov 30, 2010, 06:04 PM
bswb97
 
158 posts · Aug 2010
Bumping this one up. To me, this seems like it SHOULD be easy but I can't figure it out. I've tried the Custom Post Limit plugin, but that again limits anything using index.php to the designated post count. I just want it to show more posts when you click "Older Entries".
  #4  
Old Nov 30, 2010, 08:22 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Just wrap a php if around 'The LOOP' to check the post count and if you are on the front page 'is_front_page()'

Somewhere there is a thread where I gave directions for changing the 'exclude side bar on these pages' to an 'include sidebar on these pages'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 30, 2010, 11:53 PM
bswb97
 
158 posts · Aug 2010
Here's the loop code:
HTML Code:
<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>
Where do I insert it? Thanks!
  #6  
Old Dec 5, 2010, 09:25 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I'd put the if at the beginning and the closing bracket at the end of that section so the entire loop is enclosed by the if
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Dec 7, 2010, 11:30 AM
bswb97
 
158 posts · Aug 2010
I apologize, but I'm really struggling with the code on this one. Based on Googling around, this is the piece of code I was playing with:

HTML Code:
if ( is_front_page() AND $count == "1") { break; }
else {
So here's how I was trying to insert it:

Original Code
HTML Code:
<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>
Inserted Code

HTML Code:
<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_front_page() AND $count == "1") { break; }
else { 

( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>
I'm good at tinkering with the visual aspects of HTML but I'm only a novice at tinkering with PHP. I figure I'm doing something wrong here because when I try this, the site just breaks completely. I'm sure it's just a placement issue, though. Help?
  #8  
Old Dec 8, 2010, 02:32 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
go to ato->Style & edit CENTER COLUMN->The LOOP and look at the examples
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static text/banner image before posts in "posts page" verbalicious Page & Category Menu Bars 14 Nov 12, 2010 05:27 AM
Pagination link on home page ("Older Entries") is broken aking10 Excerpts, Read more, Pagination 5 Sep 13, 2010 02:14 PM
[SOLVED] Older Posts link on front/main page? kristal Center area post/pages 4 Feb 26, 2010 07:52 AM
[SOLVED] &quot;Older Posts&quot; Navigation to Page 2 Not Working clintonfitchdotcom Page & Category Menu Bars 2 Feb 4, 2010 10:24 AM


All times are GMT -6. The time now is 03:05 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.