widget most popular listing

WordPress Business Themes Forums Version 7 Themes DirectoryPress widget most popular listing

widget most popular listing

July 25, 2013
Monique Monique
  • Monique
    Monique
    Newbie 46 points

    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

    July 25, 2013 at 4:31 am

  • Alexandra
    Newbie 65 points

    try this ? havent tested it

    meta_key=hits&orderby=hits&order=desc&posts_per_page=5

    July 25, 2013 at 5:28 am
  • Mark Fail
    Mark Fail
    Super Guru 12,812 points

    meta_key=hits&orderby=meta_value&order=desc&posts_per_page=5

    July 25, 2013 at 7:06 am

  • Alexandra
    Newbie 65 points

    :) oops … forgot to change the orderby

    July 25, 2013 at 9:33 am
  • Narender Kumar
    Narender Kumar
    Senior Member 273 points

    Hi Mark,

    I have just tried it. It is taking one listing (which has very low hits) on the top position. Other four listings are randomly arranged and not highest to lowest. Is it suppose to work like this or am I missing something.

    Regards,

    July 25, 2013 at 12:21 pm
  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points

    meta_key=hits&orderby=meta_value&order=desc&posts_per_page=5

    This query will not work properly as ‘hits’ are numerical and orderby=meta_value does orders numbers as ‘characters’. You should use the orderby=meta_value_num instead.

    The correct query would look like this:
    meta_key=hits&orderby=meta_value_num&order=desc&posts_per_page=5

    Kind regards,

    Richard
    _____________________________________________________________________
    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

    July 25, 2013 at 6:17 pm
  • Steven
    Steven
    Newbie 69 points

    Are these suppose to work within the text widgets? I am not sure where to place these.

    July 25, 2013 at 6:55 pm
  • Steven
    Steven
    Newbie 69 points

    I have got to say something here. I am trying my hardest to get things to work on this theme, from GD Stars, to confirmation links, to widgets. I am not sure why there is no simple explanation on how to use all of these features, but spending so many hours trying to get one simple thing to work is very time consuming and tired-some. I really love the new theme, but if I cannot get anything to work like it does in the Demo, its no good for me.

    You guys are talking about custom queries here, why is it that I cannot get one thing to work like it should. I am lost yet again..

    1. My confirmation link for mailing list does not work.
    2. The Google map shows when it wants to and not all the time.
    3. I really would like to GD stars rating to look like the demo, but my listing image never show up.
    4. I cannot get any custom query to work on featured listings.

    I am Sorry, but this is very frustrating…

    July 25, 2013 at 7:10 pm
  • Narender Kumar
    Narender Kumar
    Senior Member 273 points

    Hi Steven,

    Need not to be disheartened. I am also not a coder. I am trying to learn myself over internet and from the great guys in the forum. Believe me PP themes are far most best than competition as what I have learned.
    I would suggest you to do a little research around the points which bother you or just ask the forum guys. People here are so helpful I can’t tell you. After all we all learn from others.

    Best Regards,

    July 26, 2013 at 10:56 am
  • Narender Kumar
    Narender Kumar
    Senior Member 273 points

    Hi Richard,

    Thanks a lot. It worked.

    July 26, 2013 at 11:12 am
  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points

    :)

    July 26, 2013 at 9:14 pm
  • Jennifer
    Jennifer
    Senior Member 119 points

    Hi Richard, and anyone else who will listen. I’m stuck on something that my business model requires, and I went through a dozen other themes before I settled on this one because I needed both star ratings and sort options.

    I am trying to achieve Order Results by Rating. I took these steps (below), and when I do the search, I get a list of rated products, but they are not in the right order. They don’t seem to be in any order.

    Steps: In General Setup/Advanced Search Options, I entered the code: Rating (high to low)[orderby=starrating&order=desc] (I also tried meta_key=starrating&orderby=meta_value_num&order=desc)

    Then, in the class_white_label_themes.php file, I added these two sections of code along side all the other rating criteria (in the area of lines 650 and 690) :

    case “starrating”: {
    $GLOBALS[‘custom’][] = array(
    ‘key’ => ‘starrating’,
    ‘orderby’=>’meta_value_num’ );
    } break;

    AND –

    }elseif ( $_GET[‘orderby’] == “starrating” ) {
    $orderby = $wpdb->prefix . “postmeta.meta_value+0 “.$this->core_order();

    Can anyone help me? I’ve spent so much time and money already trying to fix this, and I’m getting hopeless. If I can’t make it work, I have to abandon the theme, and I don’t know what else I would use. Mark’s response is that the code “looks good but would need some testing, and we don’t offer that feature.” I think he’s done talking to me about it. Knowing if it’s even possible would be a step in the right direction. I’m stuck now pouring through the WordPress Codex and learning PHP, hoping I’ll get somewhere, but I don’t know if I ever will.

    Thanks, Jennifer

    November 15, 2013 at 4:44 am
  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points

    The queries should theoretically work without any issues, but for some reason they don’t. The whole query system is screwed up in the responsive themes and because of that you are not even able to use 3rd party plugins to extend or otherwise modify the search (as it does not work).

    Mark, can you please simplify/fix the query/search system so that it works like standard WordPress? It will then enable us to extend/modify it using custom queries, functions and plugins.

    Kind regards,

    Richard
    ____________________________________________________________________
    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

    November 15, 2013 at 12:09 pm
  • Aaron
    Aaron
    Super Guru 922 points

    Not sure why you can’t get it to work, the custom post type just needs to be set in your array – most plugins only account for default taxonomies and post types.

    November 15, 2013 at 2:13 pm
  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points

    Aaron, have you tried ordering listings by anything else than the default?
    Ordering by featured does not work, ordering by starrating does not work, ordering by price does not work….
    Mark has hardcoded many of the queries in the framework and it is impossible to override it in any other way than to modify the core files.
    Even places like homepage objects are affected – 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).
    There are numerous threads pointing this out but no solution. This needs to be addressed ASAP.

    November 15, 2013 at 3:35 pm
Viewing 15 posts - 1 through 15 (of 77 total)

Didn't find what you were after?

Chat with us now

or contact our support team