Tagged: sort options, wpml
-
AuthorPosts
-
September 25, 2017 at 1:15 pm #856466
Hi Kriesi Support Team
You helped me do the following a while ago:
Which was
-> remove ‘All’ Category
-> remove the first separator on the left (which came after ‘All’)
-> default to first sort Category ‘anlageobjekte’We are now translating the website to English and are implementing it via WPML. I started to re-create all the Portfolio entries in EN (not all are done yet), when I noticed, that most of the above doesn’t work in the EN version of the website. I will post relevant links below.
The code you gave me to fix the issue in the German version was the following:
/* default to first category */
add_action(‘wp_footer’, ‘ava_auto_click’);
function ava_auto_click(){
?>
<script>
(function($){
$(window).load(function() {
$(‘.anlageobjekte_sort_button’).trigger(‘click’);
});
})(jQuery);
</script>
<?php
}The new ‘default’ category in English has the following slug ‘investment-properties’.
I tried to copy/paste the code in the editor functions.php and replace ‘anlageobjekte_sort_button’ with ‘investment-properties_sort_button’ but it made everything stop working and I had to remove it from the functions.php via FTP.
How can I get this also to work in the EN version of the website and also I don’t seem to be able to remove the | on the left.
Thanks so much & kindest Regards,
CorinaSeptember 27, 2017 at 4:36 am #857244Hey Corina,
Thank you for using Enfold.
Please look for this line.
$(‘.anlageobjekte_sort_button’).trigger(‘click’);Below, add this code.
$('.investment-properties_sort_button').trigger('click');Best regards,
IsmaelSeptember 27, 2017 at 5:08 am #857259Hi Ismael
You are awesome. Thanks so much.
Very grateful for your help.
Have a great day.
All the best,
Corina
PS. You can close the thread.September 28, 2017 at 5:17 am #857836 -
AuthorPosts
- The topic ‘Default to first sort Category in WPML’ is closed to new replies.
