Monique

widget most popular listing

Hello I should like to display a widget with the 5 most popular listings So i've tried "meta_key=hits&order=desc" in Custom Query But i don't get the 5 mosts hits Please can you help me Thanks

Created: July 25, 2013 at 4:31 am
  • In: DirectoryPress
  • Started by: MoniqueMonique
  • 14 members left 76 comments
  • Last reply from: MichaelMichael

  • Richard Bonk
    Richard Bonk
    November 16, 2013 at 9:28 am

    Eg you cannot exclude a tax in your query the same way as a cat or a tag – even though they are both taxonomies.

    In a standard WP you can.

  • Mark Fail
    Mark Fail
    November 16, 2013 at 2:20 pm

    Richard it would be better if you explain with examples how its ‘screwed up’, the queries all follow WP formatting otherwise it wouldnt work full stop.

  • Richard Bonk
    Richard Bonk
    November 16, 2013 at 9:38 pm

    If you have followed those many threads that discuss all those ordering issues, you would know what I am talking about. I have tried it myself on my clean install of latest responsive themes and am getting the same results as those posted by many other users.
    I have already mentioned it earlier in this thread, but here it is again:
    1) when ordering by featured – non-featured posts appear amongst them (when they should appear after the featured)
    2) when ordering by starrating (asc or desc) – it does not follow the order at all, you get the results mixed all over the place
    3) ordering by price – same as the starrating
    4) Radius search does not seem to work either
    5) if you use the Recent Listings object and would like to display latest blog posts, even though you use the correct query, it will not work (while the same query works fine in tabs object).

    This is just a collection of issues reported by other customers on the forum (and confirmed to not work)

  • Jennifer
    Jennifer
    November 17, 2013 at 12:33 am

    Hi,

    I would like to add that Mark sent me a version of the file, and it made the OrderBy Price work properly. I haven’t tried any of the others because I don’t need them, except for the star rating, which doesn’t work. It does show results that are all rated (doesn’t show anything with no rating), but they aren’t in any discernible order.

    I’ve been trying to interpret what Mark meant when he said in a tech support response that “you can only order by values which are present in the search query so the basics would be title, date and one or two mea tags such as hits and #8221;

    Does this mean that there’s some set of “fixed” WP search query options? I can’t find evidence of that when I read the WP codex. Besides, one of the supposedly searchable, order-able items that Mark’s coded into the file I was sent includes “bidwinner” and that doesn’t seem like any kind of native WP option. If we can orderby bidwinner, why not starrating?

    If I even knew which areas of the code to examine to work this out, I’d do it. I’m just totally out of ideas right now, but still learning PHP with the hopes that I’ll eventually figure it out.

  • Ian
    Ian
    November 17, 2013 at 7:27 am

    Post the here then we can see what changed.

  • Jennifer
    Jennifer
    November 17, 2013 at 9:38 am

    Here it is.

  • Jennifer
    Jennifer
    November 17, 2013 at 9:39 am

    Hmm. it’s not posting, and I can’t tell why. It says this file type is not permitted for security reasons.


  • Anonymous
    November 17, 2013 at 10:08 am

    Zip it up and try again.

  • Jennifer
    Jennifer
    November 17, 2013 at 10:19 am

    ok, here we go

    Attachments:
    You must be a member to view attached files.
  • Aaron
    Aaron
    November 17, 2013 at 11:11 am

    In a standard WP you can.

    No you can’t, to exclude a category in query_posts you simply use -345 where 345 is the cat number. Support for Taxonomies and custom post types is limited compared to the default ‘out of the box’ post types. You need to create a custom array, WP_Query or get_posts which a simple query string will never support.

    Recent Listings has the Post Type hard coded.

  • Aaron
    Aaron
    November 17, 2013 at 11:17 am

    GDStar Query Posts Examples:

    query_posts(“gdsr_sort=rating”);
    query_posts(“gdsr_sort=review&sort_order=asc”);
    query_posts(“gdsr_sort=rating&gdsr_multi=3”);
    query_posts(“gdsr_sort=votes&sort_order=asc&gdsr_multi=3”);

  • Jennifer
    Jennifer
    November 17, 2013 at 11:38 pm

    Does this mean we should be able to use this code as a model to get the built-in star ratings sorting to work? Please explain. Thanks.

  • Aaron
    Aaron
    November 18, 2013 at 12:30 am

    Those queries are only if you are using GDstar rating, I haven’t used the built in ratings at all yet.

  • Ian
    Ian
    November 18, 2013 at 1:35 am

    Recent Listings has the Post Type hard coded.

    It’s hard coded in Tabs as well but the different query method that Tabs uses must allow it to be over-ridden


Viewing 15 posts - 16 through 30 (of 77 total)