• Resolved tamia

    (@tamia)


    I use Twenty Twelve with a child theme. When setting up my site, I didn’t like the title styles for pages and posts, so used “display:none” for these in the child style.css. This works fine and I can use the style I like within each post/page.

    This has caused an unexpected problem, however. When performing searches, the search results bring up an excerpt but not the post/page title (no surprise), and therefore there is no URL link so readers can go to the full post/page.

    Is there some way I can have the search results show a title and URL link for each hit without removing my “display:none” on style.css? Do I need to add or customize code on a search.php which I then upload into my child theme?

    Thanks for any help.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You need to NOT use that style on the search results page.

    .search .page .entry-title {
        display: block;
    }

    put that *after* the display:none block.

    (edited to put a . in front of search)

    Thread Starter tamia

    (@tamia)

    Thanks Steve. I inserted your code as directed but unfortunately, that didn’t make any difference to how the search results were displayed. I refreshed the browser and tested, but still no URL link to posts. But you gave me an idea, and this is what did work:

    .search .post .entry-title {
        display: block;
    }
    
    .search .page .entry-title {
        display: block;
    }

    Can’t explain why these worked but they did! Thanks a bunch!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help – Search Results Don’t Provide URL Links to Hits’ is closed to new replies.