let links = document.querySelectorAll("a");
for (let i = 0; i < links.length; i ++) {
if (links[i].href.indexOf('test') > -1 ) {
links[i].addEventListener('click', function(){
alert('Test Link');
});
}
}
<?php if ( is_front_page() ) : ?>
<div class="header-page clearfix">
<h2 class="name-page">Акции</h2><a href="#" class="cart-btn">
<div class="cart-btn__img"><img src=" <?php echo esc_url( get_template_directory_uri() );?>/img/shopping-bag.svg" alt=""></div>
<div class="cart-btn__text">Ваша корзина</div></a>
</div>
<?php else: ?>
<div>AAAAAAAAAAAAAAAA</div>
<?php endif; ?>
gulp.task('ms', function() {
return gulp.src('public/css/semantic.css')
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename({suffix: ".min"}))
.pipe(gulp.dest('public/css'));
});