WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a child theme of the theme alterna, and in the search.php (among other code) there is this:

<div class="entry-left-side span3">
                                        <div class="post-date-type row-fluid">
                                            <div class="post-type"><i class="big-icon-file"></i></div>
                                            <div class="date">
                                                <div class="day"><?php echo get_the_date('d'); ?></div>
                                                <div class="month"><?php echo get_the_date('M'); ?></div>
                                                <div class="year"><?php echo get_the_date('Y'); ?></div>

I want to be able to get rid of just that part, so I am thinking on copying the exact search.php to the child theme and get rid of that part.

Is that the correct way to do so?


share|improve this question
Yup, best way of doing it, always use a child theme to do core edits to a theme so you have a backup incase of issues in future or upgrades. – Gareth Gillman May 21 '14 at 16:30
Exactly how it should be done. You are on the right track – Pieter Goosen May 21 '14 at 16:32
But then, if the parent theme is updated, and they change the search.php file, I would be outdated right? – Hommer Smith May 21 '14 at 16:34
Yes but it won't break your search file and you only need to then edit the child theme file again if it needs an amendment. – Gareth Gillman May 21 '14 at 16:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.