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)
-   -   [SOLVED] pagination doesn't work anymore (http://forum.bytesforall.com/showthread.php?t=9470)

drongo Sep 7, 2010 09:27 AM

[SOLVED] pagination doesn't work anymore
 
Hello,

some time before I did some editing in my blog: I wanted to have a home-page with an introducting text and a specific category of articles after it. I tried some plugins, but it doesn't work well.
With the help from some board (don't know anymore...) I got to edit the theme like this:
I did a copy of the index.php and renamed it to blog.php
I edited the index.php and at the end, right before
Code:

<?php get_footer(); ?>
I wrote:
Code:

<?php
$blog= c2c_get_custom('blog');

if ($blog!= '') {

// Which page of the blog are we on?
$paged = get_query_var('paged');
query_posts('showposts=6&'.$blog.'&ec3_after=2000-01-01&order=desc&ec3_listing=all&paged='.$paged);

//load index to show blog
load_template(TEMPLATEPATH . '/blog.php');

}
 ?>

The blog-variable came from a plugin which allows me to grab some variables from my pages. At the home-page, I added the variable 'blog' and gave it the value of the wanted category, like cat=23.
Now, I get a loop with six articles (showposts=6) of the category defined in the blog-variable.
And with 'paged' I was able to list also older articles. But this is not working anymore. I get the page and the articles in it, but if I click on "older entries" (with the link http://www.gocart-online.com/?paged=2), I get the page with the same six articles.
If I translate the code from above to a link in the browser, like
Code:

http://www.gocart-online.com/?showposts=6&cat=23&ec3_after=2000-01-01&order=desc&ec3_listing=all&paged=2
it is working, but not from within the theme. This was working before I switched to WP3. I got my page and within it the blog of the category 23 and page one, two and so on.
I also updated to the newest version of the theme, nothing changed...
Mabe some code is not working anymore? $paged = get_query_var('paged'); for example?

Any ideas?
Thank you very much,
Drongo

drongo Sep 10, 2010 09:42 AM

Okay, I got a clue WHY this is not working, but not how to fix it...
This is only a problem at the HOME-Page. At the HOME-page the URL is only the Domain-Name, in my case http://www.gocart-online.com. The "older entries" at the bottom links only to http://www.gocart-online.com/?paged=2, which does not work. It shows me the same articles. But: at other pages, like http://www.gocart-online.com/?page_id=653, the page_id shows up and the "older entries" link is: http://www.gocart-online.com/?page_id=653&paged=2.
Here, it is working.
How can I get WP to show the page_id in the URL of the HOME-page? Its an ordinary page as the other pages, but defined as HOME-page.

Greetings,
Drongo

drongo Sep 10, 2010 10:02 AM

okay, got a workaround. I made an empty page as the HOME-page and installed a plugin to redirect automaticly from this fake home-page to my normal one. And there I have my page_id...

greetings,
Drongo


All times are GMT -6. The time now is 06:51 AM.

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