Changing the template for posts
-
I started to create my first WordPress theme from scratch a couple of days ago. The theme is made for a portfolio website and for that I want several sections and templates for the site. The sections are a portfolio view (like a grid with all the projects assembled), a project view (a page/post for each project) and a page with news (like a simple blog view).
I began with creating the index.php using a HTML template that I originally made for the project view. The project view contains a slideshow in the top.
Then I created a new page called “Works” and made a second page template for that page called “portfolio”. Here I put the grid and then put a loop of a custom post-type called “portfolio-item” that created an image and a link to each project.
From what I have understood, the index.php should be made as a template for the blog posts, and maybe not as a template for a custom post-type. Now when I want to create a page that lists every post (not the “portfolio-item” post-type, but just regular blog posts), it’s set in the template that I made for the project view, so each post gets a slideshow at the top.
Is there any way to assign a different template to regular posts or how would I do this the easiest way? Please get back to me if anything’s unclear (it’s pretty hard to explain).
- The topic ‘Changing the template for posts’ is closed to new replies.