-
AuthorPosts
-
January 16, 2021 at 4:59 am #1272852
Hi, I’m using the Masonry Blog feed on the home page and was wondering if the following is possible –
“Latest News” section can we eliminate the ‘All’ option in the feed filter on the top left? AND can we make the UFCW5 be the core category in the top left where the “All” currently is?
Thanks
BrianJanuary 17, 2021 at 6:27 am #1273019Hey schwabino,
Please provide a link to the site/page in question so we can look into this issue further.
Best regards,
Jordan ShannonJanuary 17, 2021 at 7:20 pm #1273148January 22, 2021 at 1:42 am #1274554January 22, 2021 at 3:36 pm #1274768Hi,
Sorry for the very late reply, first I would point out that you don’t have to have the current sort title showing on the left, changing to Yes, display sort options will remove this and only show the sort breadcrumbs on the right, but centered.
So assuming that you do want to keep the current sort title on the left, and change the “All” to “UFCW5” on the right, please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:#top.home #av-masonry-1 .ufcw5_sort_sep, #top.home #av-masonry-1 .ufcw5_sort_button { display: none !important; } a.all_sort_button > span > span { font-size: 0 !important; } a.all_sort_button > span:before { content: "UFCW5" !important; }
To change the “All” on the left when “UFCW5” is active we will need to add this custom script. Please try adding this code to the end of your functions.php file in Appearance > Editor:
function custom_script() { ?> <script> (function($){ $(document).ready(function(){ $("#top.home #av-masonry-1 .av-masonry-sort").each(function(){ if ($('.av-sort-by-term .all_sort_button').hasClass('active_sort')) { $('.av-current-sort-title > span > span').text(function(index, text) { return text.replace('All', 'UFCW5'); }); } else { } }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
Then clear your browser cache and check.
Best regards,
MikeJanuary 22, 2021 at 9:38 pm #1274863This reply has been marked as private.January 24, 2021 at 3:44 pm #1275074Hi,
Thank you for the login, I added the first block of code above [css] to the WordPress > Customize > Additional CSS
this is what changes the sort on the right, and I updated and added the second block of code to your WordPress > Appearance > Editor > Enfold > functions.php this is what changes the “All” on the left.
This is the updated code:function custom_script() { ?> <script> (function($){ $(document).ready(function(){ savvy = { UFCW5: function() { $("#top.home #av-masonry-1 .av-masonry-sort").each(function(){ if ($('.av-sort-by-term .all_sort_button').hasClass('active_sort')) { $('.av-current-sort-title > span > span').text(function(index, text) { return text.replace('All', 'UFCW5'); }); } else { } }); } }; savvy.UFCW5(); }); $('.all_sort_button').on('click', function(){ setTimeout(function(){ savvy.UFCW5(); },5); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
This seems to be working correctly, please clear your browser cache and check.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.