Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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>
                                            </div>
                                        </div>
                                    </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?

Thanks

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 at 16:30
    
Exactly how it should be done. You are on the right track –  Pieter Goosen May 21 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 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 at 16:37
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.