Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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
    Brian

    #1273019

    Hey schwabino,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1273148

    Duh my bad –

    Thanks, Jordan!

    B

    #1274554

    Any word on this?

    http://www.ufcw5.org is the website

    Thanks
    B

    #1274768

    Hi,
    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.
    2021-01-22_063338.jpg
    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,
    Mike

    #1274863
    This reply has been marked as private.
    #1275074

    Hi,
    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.