I have used add_filter to customize the query in the functions.php within the theme folder. This gives me the custom query but I can’t seem to get functions like, remove_filter or wp_reset_query to work in the index.php. Also, I have tried wrapping the add_filter function with if(is_home) or if(is_front_page) so that only this custom query is used on the front page but it fails to give me the results I want as well. Where could I place this code so that it only applies my filter on the homepage?
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘is_home() is_front_page() not working in sidebar.php’ is closed to new replies.