StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   "Next Page" on blog returns "Nothing found" (http://www.studiopress.com/support/showthread.php?t=10089)

Marcoayuso 06-20-2009 11:05 PM

"Next Page" on blog returns "Nothing found"
 
Hi!

I set up my blog page to show only 3 posts per page. But when I click on the "Next Page" link at the bottom to get to the second page of the blog and read 3 next posts, I get a "Sorry, no entries found for what you're looking for".

How can I fix this?

Thanks!!

Blog page: http://www.elpoderdelaprincesa.com/blog

Marco

CharlesClarkson 06-21-2009 04:53 AM

Re: "Next Page" on blog returns "Nothing found"
 
Quote:

Originally Posted by Marcoayuso
I set up my blog page to show only 3 posts per page.

Where did you set this?


When you set up the blog page, did you follow these instructions?

If you did, can you show us the page_blog.php file?


HTH,

Marcoayuso 06-21-2009 09:45 AM

Re: "Next Page" on blog returns "Nothing found"
 
Hi Charles, Thanks for the reply.

The number of posts was set up at the LifeStyle Them Options panel.

I had set up the blog page but not configured it to show all categories, so what I did was create subcategories of a main category named "blog". Then, I had installed the Category Base plugin to remove "category" from permalinks, so I ended up with a category and a page named "Blog", that's why it didn't work. I changed the page_blog.php file to show all posts from all categories, removed the plugin, removed the main category blog, and the "Next Page" link worked.

Now I have another problem. The first page of the blog doesn't show/load the background and border of the content area (wrap), but when you click to go to the second page of the blog (which now works), there, it loads w/o a problem. What am I doing wrong?

This is the code of my page_blog.php file...

Code:

<?php
/*
Template Name: Blog
*/
?>

<?php get_header(); ?>

<div id="content">

        <div id="contentleft">
       
                <div class="postarea">
       
                <?php include(TEMPLATEPATH."/breadcrumb.php");?>
<?php global $more; $more = 0; ?>
                               
                        <?php $blog_cat_1 = get_option('lifestyle_blog_cat_1'); $blog_cat_1_num = get_option('lifestyle_blog_cat_1_num'); if(!$blog_cat_1) $blog_cat_1 = 1; //setting a default ?>
                               
                        <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("showposts=".$blog_cat_1_num."&paged=$page"); while ( have_posts() ) : the_post() ?>
           
                        <h1><?php the_title(); ?></h1>
                               
                        <div class="date">
                       
                                <div class="dateleft">
                                       

<span class="time"><?php the_time('F j, Y'); ?></span> por <?php the_author_posts_link(); ?> <?php edit_post_link('(Edit)', '', ''); ?>
 Guardado en <?php the_category(', ') ?></p>
                                </div>
                               
                                <div class="dateright">
                                       

<span class="icomment"><?php comments_number('Haz un comentario', '1 Comentario', '% Comentarios'); ?></span></p>
                                </div>
                               
                        </div>
                        <?php the_content(__('[Read more]'));?><div style="clear:both;"></div>

                        <div class="postmeta2">
                                Guardado en: <?php the_category(', ') ?>
Etiquetas: <?php the_tags('') ?>
                        </div>
                                                       
                        <?php endwhile; ?>
                       
                       

<?php posts_nav_link(); ?></p>
               
                </div>                </div>
               
        </div>
       
<?php include(TEMPLATEPATH."/sidebar.php");?>
               
</div>



<?php get_footer(); ?>

Thanks!
Marco

CharlesClarkson 06-21-2009 10:42 AM

Re: "Next Page" on blog returns "Nothing found"
 
Quote:

Originally Posted by Marcoayuso
This is the code of my page_blog.php file...

Code:

                        <?php endwhile; ?>
                       
                       

<?php posts_nav_link(); ?></p>
               
                </div>                </div>
               
        </div>


You added an extra </div> without first opening a <div>.


HTH,

Marcoayuso 06-21-2009 11:16 PM

Re: "Next Page" on blog returns "Nothing found"
 
Thanks! that helped only in the first page of the blog. When you click to go to the second, then the sidebar appears at the bottom, right after the content. The code that I think is causing this is a code I put to make the "Read More" tag work in pages, because whenever I remove that code, the page works perfectly, but I really want to have the Read More function. Any idea how I can do this?

The code I added is this:

Code:

<?php global $more; $more = 0; ?>
And I added it so it appears as follows:

Code:

</div>
                        <?php global $more; $more = 0; ?>
                        <?php the_content(__('[Read more]'));?><div style="clear:both;"></div>

Thanks!
Marco


All times are GMT -5. The time now is 09:39 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.