Missing content-search.php? #401

Ahrengot opened this Issue Feb 7, 2014 · 2 comments

4 participants


On line 22 of search.php there's a get_template_part() call that looks like this:

<?php get_template_part( 'content', 'search' ); ?>

but there doesn't seem to be any content-search.php template. Isn't this a bug, or am I missing something here?


No, this is not a bug. If content-search.php does not exist then it falls back to content.php. The reason it is done like this is so to allow theme developers to addcontent-search.php` easily if need be but also this allows child theme authors to make changes too.

The codex explains it quite well. http://codex.wordpress.org/Function_Reference/get_template_part

Automattic member

@grappler is correct - you can have that as an option and as this is a base theme this gives builders more options. I'm going to close this up as should be resolved.

@karmatosed karmatosed closed this Feb 10, 2014
@karmatosed karmatosed added the Close label Feb 10, 2014
@obenland obenland removed the Close label Feb 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment