Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Different # of posts shown on front page, "Page 2" (older entries), etc. (http://forum.bytesforall.com/showthread.php?t=11349)

bswb97 Nov 23, 2010 03:06 PM

Different # of posts shown on front page, "Page 2" (older entries), etc.
 
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.

bswb97 Nov 23, 2010 03:24 PM

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?

bswb97 Nov 30, 2010 06:04 PM

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".

juggledad Nov 30, 2010 08:22 PM

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'

bswb97 Nov 30, 2010 11:53 PM

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!

juggledad Dec 5, 2010 09:25 AM

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

bswb97 Dec 7, 2010 11:30 AM

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?

juggledad Dec 8, 2010 02:32 PM

go to ato->Style & edit CENTER COLUMN->The LOOP and look at the examples


All times are GMT -6. The time now is 01:10 PM.

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