Lester Chan's Forums

Please login or register.

Login with username, password and session length
Pages: [1]   Go Down

Author Topic: query_posts('r_sortby=most_rated&r_orderby=desc')  (Read 1948 times)

0 Members and 1 Guest are viewing this topic.

Steker

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
    • View Profile
query_posts('r_sortby=most_rated&r_orderby=desc')
« on: 22 August 2008, 13:47 »
I'm trying to use this function.

I created a custom template (a copy of my index page) including this query_posts instead of the "date-sorted list".
Then i created a page called: most-votes.
so when i go on this page (http:/:www.mysite.com/most-votes/), it displays the 20 most rated posts.

Then, when i click on: "previous entries", it opens a page (http:/:www.mysite.com/most-votes/page/2/), but this page displays the same 20 posts as previous page... It should display posts 21 to 40...

Is there any way i can make this work ?
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #1 on: 22 August 2008, 14:50 »
you need to pass in a paged argument as by default it is always page 1. Do a search for it
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

Steker

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
    • View Profile
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #2 on: 22 August 2008, 16:44 »
Im sorry but i cant find a way to make that work :/
Maybe you have little time to help me with that...
I guess im not the only one needing to sort the posts with your plugin in a several-pages-list...
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #3 on: 22 August 2008, 16:46 »
sorry but I do not have the time to update my plugin let alone help you.

Here is a tutorial to get you started http://codex.wordpress.org/Template_Tags/query_posts
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

Steker

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
    • View Profile
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #4 on: 22 August 2008, 16:54 »
i just checked the page, and the 'paged' option, does it mean i have to create a new page for each 'paged' like most-rated page 1, most-rated page 2,... or is there a way to make it dynamic ?
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #5 on: 23 August 2008, 04:43 »
Code: [Select]
$paged = intval(get_query_var('paged'));
query_posts('r_sortby=most_rated&r_orderby=desc&paged='.$paged)
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

sudesh

  • Newbie
  • *
  • Offline Offline
  • Posts: 6
    • View Profile
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #6 on: 03 September 2008, 09:10 »
Hi Gamerz,

i want to do the same thing as steker, but i want to know how can i have my url like http:/:www.mysite.com/most-votes/, i tried my site it won't work, it shows 404 page error.

I know i should have gone to wordpress forum, that i did, but i didn't got any reply seems a very idiotic question, but still i you can help it would be great.

Or atleast please provide link where i can find a solution.

Thanks
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
« Last Edit: 03 September 2008, 11:40 by GaMerZ »
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

sudesh

  • Newbie
  • *
  • Offline Offline
  • Posts: 6
    • View Profile
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #8 on: 04 September 2008, 04:29 »
Thanks Gamerz

Its done

it was a idiotic question i asked

anyway thanks for your prompt reply

sudesh
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
Re: query_posts('r_sortby=most_rated&r_orderby=desc')
« Reply #9 on: 04 September 2008, 04:46 »
No worries =) I also learned it from that link.
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
Pages: [1]   Go Up
« previous next »
 

Page created in 0.034 seconds with 25 queries.