• Resolved SandyMcDonald

    (@sandymcdonald)


    With the Andrina Lite theme, the title in the Search Results page is not displaying properly as shown here. The green bar starts in a different position and ends too quickly. It is supposed to extend across the page above the side widget containing the contact information.

    All other pages including the Category Results page are displaying correctly. An example of the correct display is here

    The search.php, blog.php, category.php, single.php files all use the page-content, content-bar, and grid_16 alpha classes. Is the answer in the style.css? Can someone please explain why this is happening and what the fix would be?

    Thank you, Sandy

Viewing 7 replies - 1 through 7 (of 7 total)
  • Sandy-
    Looking at the source code of the two pages you linked to, the HTML is different on both of them.

    On the page that works correctly the HTML looks like this:

    <div class="page-content">
      <h1 class="page_title single-heading">Category Archives: Energy Efficiency</h1>
      <div class="grid_16 alpha">
        <div class="content-bar">

    While on the search results page you’ve got this:

    <div class="page-content">
     <div class="grid_16 alpha">
       <div class="content-bar">
         <h1 class="page_title">Search Results for: furnace</h1>

    If you move that <h1 class="page_title">...</h1> (make sure to copy the line as it’s written in the template file otherwise you won’t have any text show up) to above the <div class="grid_16 alpha"> I think you should be able to make them look the same (I haven’t actually tested it, but it seems like that’s the major difference).

    HI Sandy,

    I just downloaded the theme and the way it displays the search result is correct. That’s what I get on my test site too.

    If you look at the theme files, the search results use the search.php template and if you compare it to the page.php, the_title is displayed higher up in the template above the grid_16 column.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    That’s making sense. I moved the line of code for the title in search.php to the same position as the category.php. That made the search results page display like all the other pages as long as search results exist. When you search for a term that is not found, the content in the side widgets all move over to the left side.

    What is causing this behavior? How do I correct it?

    Sandy-
    I downloaded the theme and looked at the template file. I figured it would take longer to write out how to fix it than to fix it myself and just post a modified copy of the file, so you can download a replacement for your search.php file here.

    The changes I made allow for the green “Search Results” bar to show up full width regardless of whether there are any results or not. The widgets also stay in the correct place on the right side of the page (I wasn’t able to replicate your problem where they jumped over, but then again I didn’t try too hard to replicate it when I saw that what I did seemed to work).

    Hopefully this helps.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    David,
    Thank you very much. It fixed the problem. I edited the file last night but the mistake I made was to move the entire if statement above the grid_16 and content-bar lines of code. My change worked as long as search results existed but the layout of the page screwed up with no results found.

    I see your solution was jut to take the title line of code out of the if statement and place it above the grid_16 and content-bar lines.

    What is GetHub?

    Thank you very much for your help!

    Yeah I figured you maybe moved more than that one line – it seemed like a better idea to just send you an updated file rather than try and figure out what you may have inadvertently changed.

    GitHub is a place where people can collaborate on development using the distributed version control system Git to keep track of changes. The GitHub Gist site is just a nice place to post large chunks of code to share with others (way better than trying to do it on the support forums).

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    GitHub sounds nice. I’ll sign up for an account. Once again, thank you for resolving the issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search Results Page Title Not Displaying Correctly’ is closed to new replies.