• I want to change the template that is used for Search Results.

    The current line in search.php is

    <div class=”page layout hfeed site defaulttemplate”>

    and I want to use the full width page template but unsure how to phrase it.

    fulllwidthtemplate Or fullwidthpagetemplate Neither work.

    Thanks

    • This topic was modified 2 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • I am not clear on exactly what you are trying to do. If you want to replace a line of code in a specific file then replace that line.

    Thread Starter Jasnick

    (@jasnick)

    I was wondering what the correct replacement would be for the part of the line that says “defaulttemplate”.

    You could add a new class:

    <div class="page layout hfeed site defaulttemplate mynewclass">

    mynewclass could be any word, but should be unique.

    Then add your custom CSS class also.

    
    .mynewclass {
    your CSS here
    }
    

    How you do that depends on your theme – ask them.

    In a pinch, you could add inline styling (simple example):

    <div class="page layout hfeed site defaulttemplate" style="width:100%;">

    Thread Starter Jasnick

    (@jasnick)

    OK – thank you very much for the help. Much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replace line in search.php’ is closed to new replies.