-
AuthorPosts
-
August 24, 2018 at 10:57 pm #1001428
Hello.
1- How can I select a category to start when showing a portfolio ?
Example: https://kriesi.at/themes/enfold/portfolio/portfolio-ajax/
That shows “All” when you see the page. The problem is that I have hundreds of items so I need them to start with one category.
So for example in that link how can I set it to start with “CCS” selected.
2- How to create the same portfolio as this demo ?
Example: https://kriesi.at/themes/enfold-2017/portfolio/portfolio-4-columns-centered-ajax/
There you show the category in which you are at the left, all the categories at the right and the setup is different.
Please let me know how to achieve both points. 1 and 2.
Thank you.
August 25, 2018 at 12:09 pm #1001611Hey peterolle,
1 Here is a possible solution for you
https://kriesi.at/support/topic/portfolio-sortfilter-by-catagory-on-load/#post-3492052 is just a portfolio grid added to the page with the slider or color section on top.
Best regards,
VictoriaAugust 25, 2018 at 12:41 pm #1001620I tried it with no luck.
My portfolio category slug is “g-2” and I added this:
function add_custom_script(){ ?> <script> (function($){ $('a[data-filter="g-2_sort"]').trigger('click'); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script');That should be the way to add it correct ?
Thank you.
-
This reply was modified 7 years, 2 months ago by
peterolle.
August 26, 2018 at 4:46 pm #1001898Hi,
You should add a timeout or document load check to your code like:
function add_custom_script(){ ?> <script> (function($){ $(window).load(function() { $('a[data-filter="g-2_sort"]').trigger('click'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script');Best regards,
Dude -
This reply was modified 7 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
