Popular Post View widget

This topic contains 8 replies, has 5 voices, and was last updated by  Stiofan O’Connor 10 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #19379

    perfectpaddles
    Free User
    Post count: 9

    Hi – I am having a couple of issues with the Populate post view widget that I am hoping someone can help me with.

    I have selected 2 post categories to be included in the widget (paddle reports, paddle tips).

    1) 2 posts that I have created have been assigned both of these 2 categories (paddle reports and paddle tips). When I view the page with this widget – I get 4 listings in my widget – duplicating each post. I would think that I should only get 2 listings. It seems like the query should be doing a distinct. If 4 posts is the correct result, can we display the category so you can see at least why the posts are listed twice?

    2) There is a “View All” link on the widget. When I click it, I am taken to a category page for just one of the 2 categories I selected. I would think I would be taken to a listing page that shows me both categories. Is there a way to do this?

    Thanks!

    #19414

    Guust
    Moderator
    Post count: 29970

    Interesting 🙁
    I’ll get Stiofan to look at this.

    I have set the popular post widget for Attractions to show both Trades and Brickies at http://goldroo.net/
    As you can see, I get 2 the same listings on the location page.
    When following the View All link it shows listings from both categories.

    #19460

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    would you please provide a url and wp admin credentials in a private reply?

    I’ll look into it.

    Thx

    #19472

    perfectpaddles
    Free User
    Post count: 9
    This reply has been marked as private.
    #19482

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    that is how the widget currently works.

    WordPress allows to show either the CPT page (all categories) or one category at a time.

    So if you select places and leave category blank, it will not show the listing twice and the view all link will be for the CPT page (showing all categories)

    I’m sure we can avoid somehow to show duplicate posts (1 per category), but it will be very hard to create a link to show only those 2 categories (URL would look like a search URL).

    I’ll pass this to Stiofan to see if has anything to add.

    Thx

    #19485

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Paolo is right, there is no way to show both cat’s without a ugly search url.

    Stiofan

    #19487

    Dmitri
    Free User
    Post count: 42

    Hello,

    I just updated to the latest 1.2.7 version of GD, and just right after it I have duplicates listing on my home page – widget GD Popular Post View.

    http://www.informeron.lv/

    Thanks,

    #19490

    Paolo
    Site Admin
    Post count: 31206

    I’ve added the double post showing as a bug and referred it to developers.

    Thx

    #19563

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This has been fixed and will be in the next version.

    If you want to apply the fix now please make the following changes to geodirectory-functionsgeneral_functions.php

    line 1145 from

    $groupby = "";

    to:

    $groupby = " GROUP BY $wpdb->posts.ID ";

    line 1159+

    change to this order:

    
    
    " . $join . "
    		" . $where . "
    		" . $groupby . "
    		" . $orderby . "
    		" . $limit;

    Also 1249
    from

    $where .= " AND " . GEODIR_ATTACHMENT_TABLE . ".ID IS NOT NULL GROUP BY " . $table . ".post_id";

    to

    $where .= " AND " . GEODIR_ATTACHMENT_TABLE . ".ID IS NOT NULL ";

    Stiofan

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount