Site logo

[Support request] Removing title from search results page

Home Forums Support [Support request] Removing title from search results page

Home Forums Support Removing title from search results page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2581827
    Christian

    I have used the following snippet to remove the title from my archive pages:

    add_action( 'wp', 'lh_remove_archive_title' );
    function lh_remove_archive_title() {
            remove_action( 'generate_archive_title', 'generate_archive_title' );
    } 

    This works great. My question is, is it possible to remove the title from the search results page in the same way? (i.e. remove the entire text where it says ‘Search results for: “whatever it is”‘

    Regards,
    Chris

    #2581846
    David
    Staff
    Customer Support

    Hi there,

    try:

    
    add_action( 'wp', 'lh_remove_archive_title' );
    function lh_remove_archive_title() {
            remove_action( 'generate_archive_title', 'generate_archive_title' );
            remove_action( 'generate_before_loop', 'generate_do_search_results_title' );
    } 
    #2582273
    Christian

    Worked very well – thanks.

    #2582500
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.