Search page sets a global post
-
I have customized and styled the search results page
search.phpaccording to my needs and I implemented a main menu myself and check which menu items are active by comparing the URLget_permalink()of the current page with the given menu item.Strangely, on the search page, there is always one menu item active and
get_the_ID();returns an arbitrary page ID. Why is that? Shouldn’t the ID be false or that of the homepage?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Search page sets a global post’ is closed to new replies.