• I have the need to change the font size (larger) in just the search results.
    I am using the twenty ten theme. In the search.php in editor – this is the code:

    <div id="container">
    <div id="content" role="main">

    <?php if ( have_posts() ) : ?>
    <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1>

    Where do I insert a font size instruction? (I’ll need the exact code with the above code altered to what I need)

    I want the “Search Results for” and the search query to be much larger and the rest of the page as-is.

    Thanks in advance for any help.

    https://www.triviafrog.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • <div id=”container”>
    <div id=”content” role=”main”>

    <div id=”searchresults”>

    <?php if ( have_posts() ) : ?>
    <h1 class=”page-title”><?php printf( __( ‘Search Results for: %s’, ‘twentyten’ ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></h1>

    </div>

    then in the style.css write somewhere

    #searchresults {
    font-size: 11pt
    }

    change the 11pt to whatever you want.

    Thread Starter triviafrog

    (@triviafrog)

    Wow! Thanks for the quick reply. When you say “anywhere” just anywhere? You mean go into style.css and paste that in anywhere?

    Thanks infrasoundkids – great help. ??

    Yep paste it anywhere. But obviously keep to a standard, don’t paste it inbetween another class/id’s styling.

    e.g.

    if there was

    .content {
    background: white;
    border: 2px solid black;
    }

    You wouldn’t paste it inbetween the background and border line. You’d paste it either above that block or below it. Capiche?

    Thread Starter triviafrog

    (@triviafrog)

    Infrasoundkids, I followed your instructions and when I get a “successful” search result (one that leads to content on the site) nothing changes.

    When I have an “unsuccessful” search result (nothing found) the font is nice and big like I want it.

    A link to a successful search: https://triviafrog.com/?s=Jack+Nicklaus
    A link to “nothing found” search: https://triviafrog.com/?s=bruce+willis

    Thanks to anyone in advance for help.
    Again what I want on the successful search, at the top of the search results page is
    Search Results for: Jack Nicklaus for example to be huge and the rest of the page normal…

    Thanks so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help with changing the font size in just search results’ is closed to new replies.