diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index 5dd70b950fb72..95c2fa0400fe7 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -659,8 +659,10 @@ jQuery( function($) { 'li.popular-category > label input[type="checkbox"]', function() { var t = $(this), c = t.is(':checked'), id = t.val(); - if ( id && t.parents('#taxonomy-'+taxonomy).length ) - $('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c ); + if ( id && t.parents('#taxonomy-'+taxonomy).length ) { + $('input[id^="in-' + taxonomy + '-' + id + '"]').prop('checked', c); + $('input#in-popular-' + taxonomy + '-' + id).prop('checked', c); + } } );