I wrote this code for a page template page of posts, it should have most of what you want.
There is a download of a child theme with the code on this post, it might be easier to look at!
HTH
David
Thanks David,
That is exactly what I am looking for the only problem, is I created a custom post type for the Episodes and I’d like to not give post formats an option but just set this as the default.
Any ideas how to come about this?
Andrew
Hi,
I am not sure what you mean by not give post formats and set this as a default?
Do you mean the single page layout?
You can just use a custom single.php to display your episodes and save single.php as episode.php, then you can use a custom loop to control the output.
In functions.php (Child Theme) add:
/* A single.php just for custom post type == 'episode' */
function my_episode_template_redirect() {
global $wp;
if ($wp->query_vars['post_type'] == 'episode') {
if( file_exists( get_stylesheet_directory() . '/episode.php') ) {
include( get_stylesheet_directory() . '/episode.php');
die();
}
}
}
add_action("template_redirect", 'my_episode_template_redirect');
Note: in a child theme we use get_stylesheet_directory() in a parent theme we change this and use get_template_directory()
HTH
David
OK, this is getting more complicated than I anticipated.
I was hoping to just be able to go to Add New under the Episodes custom post type in the WordPress Admin Dashboard.
And the screen would open up with an Episode title text input, then an upload-able box (browse) for the episode photo cover. Then maybe a textarea for an episode synopsis. Then possibly a few upload-able (browse) boxes for a photo gallery. And then maybe a textarea for a link to a YouTube trailer for the episode.
And then also maybe text inputs that would allow inks to buy the episode of iTunes, or Amazon, or watch on HBO GO.
Thanks,
Andrew