document.addEventListener('DOMContentLoaded', function() { // Get all pagination links const paginationLinks = document.querySelectorAll('.pagination a'); paginationLinks.forEach(link => { link.addEventListener('click', function(e) { // Prevent default action e.preventDefault(); // Fetch the href of the clicked link let url = this.getAttribute('href'); // Adjust the URL for front-page pagination if needed if (window.location.pathname === '/' || window.location.pathname === '/index.php') { if (!url.includes('paged')) { url += (url.includes('?') ? '&' : '?') + 'paged=1'; } } // Redirect to the adjusted pagination URL window.location.href = url; }); }); }); Page not found - FAULT Magazine
document.addEventListener('DOMContentLoaded', function() { // Get all pagination links const paginationLinks = document.querySelectorAll('.pagination a'); paginationLinks.forEach(link => { link.addEventListener('click', function(e) { // Prevent default action e.preventDefault(); // Fetch the href of the clicked link let url = this.getAttribute('href'); // Adjust the URL for front-page pagination if needed if (window.location.pathname === '/' || window.location.pathname === '/index.php') { if (!url.includes('paged')) { url += (url.includes('?') ? '&' : '?') + 'paged=1'; } } // Redirect to the adjusted pagination URL window.location.href = url; }); }); }); Page not found - FAULT Magazine
document.addEventListener('DOMContentLoaded', function() { // Get all pagination links const paginationLinks = document.querySelectorAll('.pagination a'); paginationLinks.forEach(link => { link.addEventListener('click', function(e) { // Prevent default action e.preventDefault(); // Fetch the href of the clicked link let url = this.getAttribute('href'); // Adjust the URL for front-page pagination if needed if (window.location.pathname === '/' || window.location.pathname === '/index.php') { if (!url.includes('paged')) { url += (url.includes('?') ? '&' : '?') + 'paged=1'; } } // Redirect to the adjusted pagination URL window.location.href = url; }); }); });