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 »

[SOLVED] pagination doesn't work anymore


  #1  
Old Sep 7, 2010, 10:27 AM
drongo
 
27 posts · Sep 2009
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
  #2  
Old Sep 10, 2010, 10:42 AM
drongo
 
27 posts · Sep 2009
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
  #3  
Old Sep 10, 2010, 11:02 AM
drongo
 
27 posts · Sep 2009
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

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
If a plugin doesn't work try this: Flynn Plugins & Atahualpa 10 Sep 27, 2013 04:08 AM
Adsense doesn't work in homepage, but work in other pages. JavaBen Header configuration & styling 1 May 24, 2010 06:48 AM
[SOLVED] read more doesn't work svittner Excerpts, Read more, Pagination 4 Sep 10, 2009 08:22 PM
SEO Title doesn't work permutations Plugins & Atahualpa 3 May 14, 2009 02:36 PM
RSS feed doesn't work thayermorgan RSS, Feeds & Subscribing 2 Apr 19, 2009 06:30 PM


All times are GMT -6. The time now is 11:54 AM.


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