Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Comment (1)

  • A WordPress Commenter May 8, 2025

    Hi, this is a comment.
    To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    Commenter avatars come from Gravatar.

    Reply

Leave a comment

Sign in to post your comment or sine up if you dont have any account.

if (typeof jQuery === 'undefined') { console.error('jQuery is not loaded'); } else { console.log('jQuery is loaded, version: ' + jQuery.fn.jquery); } jQuery(document).ready(function($) { console.log('Skrypt filtrowania rozpoczęty'); // Wyświetl przyciski w konsoli console.log('Znalezione przyciski filtrowania:', $('.filter-button').length); // Prostsze podejście - użyj konkretnych klas z motywu $('.filter-button').on('click', function(e) { e.preventDefault(); console.log('Kliknięto przycisk:', $(this).text()); // Pobierz wartość filtra z atrybutu data-filter var filter = $(this).data('filter'); console.log('Filtrowanie według:', filter); // Usuń aktywną klasę ze wszystkich przycisków $('.filter-button').removeClass('active'); // Dodaj aktywną klasę do klikniętego przycisku $(this).addClass('active'); // Proste filtrowanie - użyjmy klas, które na pewno istnieją if (filter === 'all') { // Pokaż wszystkie posty $('.post-item, article, .elementor-post').show(); } else { // Ukryj wszystkie posty $('.post-item, article, .elementor-post').hide(); // Pokaż tylko posty z odpowiednim rokiem $('[data-year="' + filter + '"]').show(); } }); // Dodaj atrybuty data-year do postów $('.post-item, article, .elementor-post').each(function() { var postDate = $(this).find('.post-date, .elementor-post-date, time').text(); console.log('Znaleziona data posta:', postDate); // Wyszukaj rok w tekście daty var yearMatch = postDate.match(/b(2019|2020|2021|2022|2023|2024|2025)b/); if (yearMatch) { var year = yearMatch[0]; console.log('Znaleziony rok:', year); $(this).attr('data-year', year); } else { console.log('Nie znaleziono roku dla:', postDate); } }); console.log('Skrypt filtrowania zakończony'); });