I have files in my theme called single-audio.php and single video.php, but when I click on an audio post-format or video post-format wordpress uses the index.php instead of my single-audio.php or single-video.php files. Any ideas?
|
|
||||
| show 1 more comment |
|
There is a huge difference between Post Formats and Post Types. I am assuming you are using post formats, which do not have a default template file for you to use. What you can do though is use For example:
|
|||
|
|
|
If you really want to use single files for each post-format type you could try something like this: (paste to functions.php)
It's a possible solution, but I wouldn't recommend it, as long as you're not 100% sure about what you're doing resp. what is happening here. Jared response is the recommended way of dealing with post-formats. |
|||
|
|
|
If I understand your question correctly, you would need to do the following:
HTH |
|||||
|
single-audio.phpwould be a single post in a post type calledaudio, not a post format. – Jared Jan 30 '12 at 23:02get_template_part()call for including post format-specific content). – Chip Bennett Jan 31 '12 at 2:26