Elaine Montoya

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
in reply to: Unable to add new file #140528

I having the same issues. None of the buttons work. Have disabled plugins, themes, etc. – and still none of the WPDM buttons work. Can’t upload anything. The native WordPress buttons (ie Update) – do work.

in reply to: Invalid License Key #68502
This reply has been marked as private.
in reply to: Parent Category Count Incorrect #67968

You might want to consider having a toggle option on your settings page so the user can decide for themselves. If they want to use the parent category as a summing category, toggle on. If not, leave it disabled. Then add an if-option to the code I sent you.

I just know in my case, when an end user came to the site and sees that category has (0) documents, they don’t bother to click to see if sub-categories have any documents, so those are never found.

Just trying to improve the product 😉

in reply to: Parent Category Count Incorrect #67896

Not an ideal solution. If I’m understanding you correctly, you’re saying whenever a document is in a sub-category, you ALSO need to select the parent category to have the correct count on the ‘archive’ page.

In general, parent categories don’t have documents in them by themselves. They are a summing category.

From a programming perspective, it would make more sense that when something is a sub-category, the count loop for the parent category isn’t the total.

Here’s what I recommend (and ultimately what I changed in the code to make it work as it should). On wpdm-archive-page.php starting from line 126 change it to the following:

                  <?php if($parent == $base && count($cld) > 0):  /*there are subcategories*/ ?>

                    <?php  /*get total parent count*/

                    $q = new WP_Query( array(
                      'nopaging' ► true,
                      'tax_query' ► array(
                            array(
                                'taxonomy' ► $category->taxonomy,
                                'field' ► 'id',
                                'terms' ► $category->term_id,
                                'include_children' ► true,
                            ),
                        ),
                        'fields' ► 'ids',
                    ));
                    $ccount = $q->post_count;
                    ?>

Hope this helps – and that you ultimately change this, so that I don’t have to modify the file myself everytime there is an update.

in reply to: Parent Category Count Incorrect #67774

Unfortunately STILL the wrong answer ;-(

Let me explain….
– main category (0)
– sub-category one (2)
– sub-category three (7)

The main category should show (9) – the sum of both of it’s subcategories.

So on your php should do a $count+ each time it iterates the subcategories to get a total count for the parent category. Then echo $count.

in reply to: Parent Category Count Incorrect #67748

Did you misunderstand? Thus us for wpdm-archive – not wpdm-categories. Thanks

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