Please can someone help me, this can’t be a hard fix, as themes i have purchased are able to do this, but in a theme a building from scratch I seem unable to replicate it!
The client is an artist. on the site i have created a custom post type (Gallery). I have enabled Categories for it- so each type of gallery will be a category-eg still life. easy enough!
On the site i use custom menus, and i am generating the Galleries menu with the categories option- so when you hover over the menu item Galleries a list of categories appears.
I created a category.php to show the posts (an index page of posts). However it will not show any posts. When choosing a gallery category from the menu it shows the category name correctly, only no posts.
I have searched forums for hours today, and the only thing really that i can find is that i need to use a category id within the template loop. however this is no good at all, as i would have to create a new template for every category she creates when managing the site herself!
The simple idea being that when she adds a new category, she only has to add that category to the menu and hey-presto, when a visitor clicks on the category from the menu they are presented with all the posts from said category. But i can’t be creating a template page for every category she might ever add!
I am sure this is a really simple fix, but i cannot for the life of me find the answer. I have tried literally dozens of loop code examples from forums and the wordpress codex, to no avail. I even looked at the twenty thirteen theme and could only find a category.php file (no category-id.php etc) that i see anyhow. i copied the loop code exactly, but nothing!!
There must be a way to display the posts from a category based on the category clicked on in the menu from one template.
The website is viewable on http://www.hazel.arcreativestudio.co.uk
Please can anyone help! I am pulling my hair out!
PS I am relatively new to wordpress, only created a few other themes, and less complicated ones!
There is also very little point in adding code here, as it has changed so many times I don’t even know what version would be close!!
- The topic ‘Is It Possible To Use Categories, Or Are They A Waste Of Time!’ is closed to new replies.