Answer the question
In order to leave comments, you need to log in
Remove AdSense code from some pages in Joomla 3.10.5 (PHP 7.4)?
Good afternoon!
Please tell me how to remove the AdSense code from some pages on Joomla 3.10.5 (PHP 7.4) using the K2 component
Tried (prescribed in the template)
<
?php
if ($_SERVER["REQUEST_URI"]!='/')
{
AdSense code >
}
Added several pages separated by commas, the code does not work (ads remain on the pages)
Maybe someone knows the working code
Or knows how to solve this problem in a different way
Through the module is also not an option, since the pages are in the same category with others pages
Use a different output template for the material will not work because the pages on K2
Answer the question
In order to leave comments, you need to log in
<?php
echo JFactory::getURI()->toString(); /*полная ссылка https://site.ru/my_link?my_query#my_fragment */
echo JFactory::getURI()->toString(array('path', 'query', 'fragment')); /* ссылка частичная /my_link?my_query#my_fragment */
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question