October 5, 201213 yr Hey, Ive got a website that uses custom post types to display album covers as links. I want to be click on the particular album cover and then go to a page that shows the titles of the songs in that particular album as links to a page where that particular songs lyrics are. I have got so far as to display the album covers with custom fields and that works well, but when you click on the link, it goes to single.php. What i really want is for it to go into another page or custom index page. How would I achieve this? Would i have to create a custom post type with in another, or should i look at custom taxonomies? Atm the custom posts are being displayed on a custom page. Many thanks
October 6, 201213 yr You need to create a file called single-album.php (assuming your CPT is called album). There you would create a template specific to your album page. Edited October 6, 201213 yr by mantis
October 8, 201213 yr Author Thanks for the reply, Ive tried this and it works well and has got me closer to where I need to be, but Im still not quite there. Is it still ok to use a single.php file in wp as an index.php 'like' page? Is there a way to not use a single.php file? I think that using a template file like that will limit what i what i want to out put on it which is essentially more posts with permalinks into more posts.
October 9, 201213 yr It sounds like massive overkill to me to be using custom post types to display album covers? You could achieve the exact same just using Featured Images with normal posts or pages. With pages it's then very easy to arrange hierarchical relationships, and I believe you can do the same with posts. I did find this though: http://janina.tumblr.com/post/3588081423/post-parent-different-type
October 10, 201213 yr Wordpress follows a template hierarchy starting with index.php. In order to override the default you need to specify a template either by naming it correctly (see image) or by creating a custom template that can be applied to a page.
Create an account or sign in to comment