• Resolved belminf

    (@belminf)


    Hello.

    I’m looking at the WP functions and template tags and cannot find a way to detect whether or not the header.php is being used by the search result page.

    I want to do this so I could have the header output a title such as ‘Blog Search Results’ or whatever. I know I could just paste the header in search.php and change it there as oppose to using the header.php template but this SEEMS like it should be possible.

    So for example something like:

    <title>My Blog: <?=is_home()?bloginfo('description'): (is_search()? 'Search results': wp_title(''))?></title>

    (Sadly, there isn’t an is_search() function…)

Viewing 1 replies (of 1 total)
  • Thread Starter belminf

    (@belminf)

    Ah man…. oops. There is such a function! Apparently I was misinterpreting my PHP error. Sorry guys.

    Bad posting by me.

Viewing 1 replies (of 1 total)
  • The topic ‘Changing title of search result’ is closed to new replies.