• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to customize search.php output

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How to customize search.php output

This topic is: not resolved

Tagged: customize search.php

  • This topic has 2 replies, 2 voices, and was last updated 7 years ago by timburkart.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 26, 2019 at 6:10 pm #491347
    timburkart
    Member

    Hi,

    I guess I'm still a Genesis newbie because I am baffled. I would like to customize the search results but do not know where to begin. Search.php does not help. I'm looking for some html so that I can change the h2 tag with something smaller, perhaps an h4 or h5. I'm assuming that I have to write some php and add it to the child theme functions.php but I simply don't know where to begin.

    I would appreciate any guidance you can provide.

    Thank you!

    To view the site in question, please enter the password "hellothere"

    http://gmoresearch.org
    May 27, 2019 at 4:58 am #491357
    Victor Font
    Moderator

    Search.php is the search results page template. Copy it from the Genesis directory into your child theme directory.

    The title is HTML is found in this code:

    $title = sprintf( '<div class="archive-description"><h1 class="archive-title">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search Results for:', 'genesis' ) ), get_search_query() );

    See the H1 in that code? That's the title tag. OF course, removing the H1 and replacing it with something else is going to break SEO. Every page needs to have one H1 tag for SEO. If you want the H1 to be smaller, just change the associated CSS to use a smaller font size. This way you won't hurt your SEO and still achieve the desired result.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 27, 2019 at 7:04 am #491358
    timburkart
    Member

    Hello Victor,
    Thank you for your reply. However I guess I wasn't clear about what I want to customize. I don't want to replace the h1 tag of the page title but rather the h2 tag of each of the result items. I want to change the format altogether but don't know where to look. I am assuming this is part of a loop that displays the results of the search request.

    Thank you.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble