-
AuthorPosts
-
December 4, 2013 at 2:34 pm #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.
December 5, 2013 at 8:29 pm #196750Hi 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!
YigitMarch 20, 2015 at 8:09 pm #415492Hello 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.
March 22, 2015 at 4:25 am #415853Hi!
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,
IsmaelMay 8, 2015 at 1:33 am #441323Thanks 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 ?
May 8, 2015 at 6:31 pm #441714Hey!
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,
YigitAugust 6, 2015 at 5:52 pm #484066Hi! 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
August 7, 2015 at 5:59 am #484284Hi,
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,
RikardJanuary 26, 2021 at 11:52 am #1275449Hi,
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
January 26, 2021 at 12:29 pm #1275462I 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.
January 28, 2021 at 4:26 am #1275930Hi,
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 -
AuthorPosts
- The topic ‘How to delete 'all' in sortable masonry portfolio’ is closed to new replies.