let game = localStorage.getItem('game');
let lol = document.getElementById('game')
let val = document.getElementById('game')
let tft = document.getElementById('game')
let wr = document.getElementById('game')
let ov = document.getElementById('game')
window.onload = function() {
lol.innerHTML = game;
val.innerHTML = game;
tft.innerHTML = game;
wr.innerHTML = game;
ov.innerHTML = game;
}
<script>
let game = window.location.search.split("=")[1].replaceAll('+', ' ');
document.querySelector('h1').innerText = game;
history.pushState(null, null, '/apply/');
</script>
&swcfpc
<a href="/apply/?game=League+of+Legends" class="card shadow-lg lift h-100">
<h1 class=""><script>console.log(window.location)</script></h1>
// Цикл 2
$query2 = new WP_Query($query2); // Выводим все существующие посты, кроме последнего
?>
<?php $count = 0; ?>
<?php while ( $query2->have_posts() ) : $query2->the_post(); ?>
<?php $count++; ?>
<?php if ($count > 1) : ?>
//Выводим записи
<?php endif; ?>
<?php endwhile; wp_reset_postdata()?>