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.
Hey peterolle,
1 Here is a possible solution for you
https://kriesi.at/support/topic/portfolio-sortfilter-by-catagory-on-load/#post-349205
2 is just a portfolio grid added to the page with the slider or color section on top.
Best regards,
Victoria
I 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.
Hi,
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