Good day to all! There is such a question. The site has links to pages for example:
<a href="/contact/">Contact</a> <a href="/info/">Info</a> It is necessary to make it so that being for example on the Contact page, the link to the Contact page becomes inactive. For this, I wrote a function, but it does not work. how to fix?
function no_link( $p ) { return preg_replace( '%((loop-link|loop-link)[^<]+)[^>]+>([^<]+)</a>%', '$1<a>$3</a>', $p, 1 ); } add_filter('no_link');