[resolved] Using conditional tags page title (4 posts)

  1. soblonde
    Posted 5 years ago #

    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 http://brama-sole.co.nz/recipes/?s=pandoro+panettone&x=3&y=9
    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?

  2. vtxyzzy
    Posted 5 years ago #

    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.

  3. 123milliseconds
    Posted 5 years ago #

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

    Use child themes


  4. soblonde
    Posted 5 years ago #

    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 http://www.designsaga.com/wordpress-search-php/
    My wordpress theme is now looking a lot less wordpress, and into it's own right.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.