Support » Fixing WordPress » Using conditional tags page title

  • Resolved soblonde


    I hope to change my search page, using conditional tags to change the page title as it appears on the page. Currently it appears as the
    <h2> Your search returned the following results..
    as in
    I would like the <h2> title to show ‘Your search returned the following results..’ and when there are no results the <h2> title to show Sorry, your search did not return any results. Please try again..
    Can someone assist?

Viewing 3 replies - 1 through 3 (of 3 total)
  • vtxyzzy


    The exact solution depends entirely on your theme. If you are using a free theme, post a link to its download site here and someone may be able to help. If you are using a paid theme, you should contact the theme supplier.



    You will find the code in the search.php file in the theme’s folder

    Use child themes

    My website is a hardcoded derivative of a theme no longer available, so it has been a lot of hit and miss tweaking it. I have solved the problem. I rewrote the search.php page using the tags as shown on this page
    My wordpress theme is now looking a lot less wordpress, and into it’s own right.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using conditional tags page title’ is closed to new replies.