Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1006089

    I tried to follow all the instructions on this thread: https://kriesi.at/support/topic/remove-all-category-on-portfolio-filter/

    But all it does it remove the All tab. Not the category completely. When people scroll down to the portfolio I would like them to see the book cover tab first.

    You can see it here on my website: http://letsgetbooked.com/book-cover-marketing-design/

    I can give access to a mod if they could help me/ fix it for me?

    Here is the CSS I used:

    a.all_sort_button.active_sort, a.all_sort_button.active_sort + span {
    display: none;
    }

    a.all_sort_button {
    display: none !important;
    }

    #1006097

    Hey Amandah86,

    Please try to add this code to the child theme functions.php:

    
    add_action('wp_footer', 'ava_auto_click');
    function ava_auto_click(){
    ?>
    <script>
    jQuery(window).load(function() {
    setTimeout(function(){ jQuery('.page-id-3399 .book-cover-designs_sort_button').trigger('click'); }, 500);
    });	
    </script>
    <?php
    }
    

    It will trigger a click on the filter “Book Cover Designs” after the page loaded. You can replace 500 with a lower or higher value (if you want to delay the effect).

    Best regards,
    Dude

    #1006258

    It didn’t work

    I got this message:

    Your PHP code changes were rolled back due to an error on line 2498 of file wp-content/themes/enfold/functions-enfold.php. Please fix and try saving again.

    Cannot redeclare ava_auto_click() (previously declared in wp-content/themes/enfold/functions.php:720)

    #1006288

    Hi Amandah86,

    Try renaming the function you’re adding like ava_custom_auto_click()

    
    add_action('wp_footer', 'ava_custom_auto_click');
    function ava_custom_auto_click(){
    ?>
    <script>
    jQuery(window).load(function() {
    setTimeout(function(){ jQuery('.page-id-3399 .book-cover-designs_sort_button').trigger('click'); }, 500);
    });	
    </script>
    <?php
    }
    

    Best regards,
    Victoria

    #1006543

    That worked. Thanks so much!!

    #1006559

    Hey!

    Great, you can delete the old “ava_auto_click” function (probably you copied it from this thread: https://kriesi.at/support/topic/remove-all-category-on-portfolio-filter/ ) – it’s not required.

    Best regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.