Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #196128

    Hello.
    I am happy to meet Enfold.

    I need some help.

    I want to delete ‘all’ sort button in sortable masonry portfolio.
    So. portfolio items not show all but show first category and sort.

    not. all / cat1 / cat2 / cat3

    but cat1/ cat2 / cat3

    Is it possible?

    Thanks.

    #196750

    Hi apptwork!

    Please go to wp-content\themes\enfold\config-templatebuilder\avia-shortcodes folder and open portfolio.php file and find lines 451 and 460 and comment them out as shown in screenshot here http://i.imgur.com/lM2JJQa.jpg

    Cheers!
    Yigit

    #415492

    Hello there! I tried to do what you’ve told to apptwork, because I wanted to remove the All sort too. I’ve commented lines 601 and 611 (maybe they’re different because I have the latest version) but the All title and the All sort option are still showing.
    What do I have to do?
    Thank you!

    • This reply was modified 9 years, 8 months ago by sbarino.
    #415853

    Hi!

    You can add this to the Quick CSS field:

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

    Add this to the functions.php to activate the first category:

    add_action('wp_footer', 'ava_auto_click');
    function ava_auto_click(){
    ?>
    <script>
    (function($){	
    	$(window).load(function() {
    		$('.categoryname_sort_button').trigger('click');
    	});	
    })(jQuery);
    </script>
    <?php
    }

    Change the “categoryname” to the name of the first category on your installation.

    Best regards,
    Ismael

    #441323

    Thanks for this. However, is it possible to make it so the sorting starts on different category on various pages. For example if i have 6 categories, and on each page i have 2, is it possible to have it start on one category on one page and start on another category on another page ?

    #441714

    Hey!

    Currently it is not easily possible. Please feel free to request such feature here – https://kriesi.at/support/enfold-feature-requests/ or hire a freelance developer if you really need it.

    Regards,
    Yigit

    #484066

    Hi! I just tried the solution above. The functions code activated the correct category, but the css addition to “Quick css” did not remove the “All” link from the portfolio sort menu.

    Is there something else I need to do?

    Thank you for your help!

    Doug

    #484284

    Hi,

    Please try the following instead to see if you have any luck with it:

    span.inner_sort_button:first-of-type {
    display:none !important;
    }

    Thanks,
    Rikard

    #1275449

    Hi,
    I just try with the Css code but unfortunately doesn’t work, how can i remove ” All” an how can i activate the first category?

    Cheers

    #1275462

    I just have another Question, is it possible to make it so the sorting starts on different category on variours pages?
    For example is it possible to have start on one category on one page and start on another category on another page?

    • This reply was modified 3 years, 10 months ago by reinkieker.
    #1275930

    Hi,

    Yes, that should be possible. We could check if the ID of a particular page exists in the class attribute of the body tag, and dispatch a click event to the appropriate category. The script may look something like this..

    add_action('wp_footer', 'ava_auto_click');
    function ava_auto_click(){
    ?>
    <script>
    (function($){	
    	$(document).ready(function() {
                 var body = $("body");
                 // checks if the body contains the class name page-id-734
                 if(body.is(".page-id-734")) {
                       $('.category_sort_button').trigger('click');
                 }
                 // checks if the body contains the class name page-id-721
                 if(body.is(".page-id-721")) {
                       $('.another_category_sort_button').trigger('click');
                 }
    	});	
    })(jQuery);
    </script>
    <?php
    }
    

    Best regards,
    Ismael

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘How to delete 'all' in sortable masonry portfolio’ is closed to new replies.