I am trying to add or remove class on one tag based on URL containing posts list with below condition
<?php
if (($featured['featured']==true) AND (basename($_SERVER["REQUEST_URI"]) != 'featured-questions'))
return 'featured';
?>
Now this works fine if no pagination and url output is
http://example.com/featured-questions
I have added pagination now and url output from page 2 become as below
http://example.com/featured-questions
http://example.com/featured-questions?start=2
http://example.com/featured-questions?start=3
http://example.com/featured-questions?start=4
So how to determin this type of URL and apply conditionally class as I required?
Hi below solution works with my issue in case someone need the same.