jQuery(document).ready(function($){
if (window.location.pathname === '/' || window.location.pathname === '/index.php') {
setTimeout(function() {
$.ajax({
url: '/wp-admin/admin-ajax.php',
method: 'POST',
data: {
action: 'getBlogContent'
},
success: function(response){
$('#homepage-blog-grid').html(response);
}
});
}, 300); // 300–500ms обычно достаточно
}
});