Buttons count - by designerobot - on WordPress WooCommerce support

This topic has 4 replies, 2 voices, and was last updated 6 years, 6 months ago ago by Rose Tyler

  • Avatar: designerobot
    designerobot
    Participant
    September 27, 2017 at 22:53

    Hi, some months ago I asked you a help to customize the buttons on the portfolio page. You replied that it was out of your service and I had to ask an external developer. I did so and hired him.
    In this months he was able to do almost all things I asked him.
    For example, he was able to put the number with the count on all buttons.
    The number between brackets after the name of the category is correct.
    The problem is the number between brackets in the first button (“Show All”). In this case, the count is not exact because it collects all posts in every language. I would like the count is only for the language showed in that moment. The developer told me that the problem is the javascript used in theme and, according to him, only who wrote it can solve this problem. He worked several days wihtout find a solution.
    He used this code (

    <?php
    	$count_posts = wp_count_posts('etheme_portfolio');
    	$total_posts = $count_posts->publish;
    	echo $total_posts . ')';
    ?>

    to do the task, but as said it is not perfect. Do you have any idea on how to correct it?
    Please see below in the pvt content the link to see the result.

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 28, 2017 at 09:36

    Hello,

    Please note that we recommend to make changes in a child theme to prevent of losing modifications after theme update. Otherwise you need to save changed file and reupload it after update.

    Change this code http://prntscr.com/gqnvwd to

    $i = 0;
     while ( $loop->have_posts() ) : $loop->the_post(); $i++; endwhile;
     echo $i . ')'; 

    in framework/portfolio.php file.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 28, 2017 at 10:34

    Hi Rose, thank you very much!!!
    Finally, I was able to solve this point after months of attempts.
    Your client service is really very expert.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 28, 2017 at 10:36

    You’re welcome!

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Buttons count’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.