I am looking at using a custom template for a set of categories. Is it possible to use a category template (like category-4.php) on a parent category and have the children use that template as well?
So based on the answer so far, is there a way to accomplish this? I want to add text and images to all categories within a parent category.
From the documentation it does not appear to be possible without actually adding several category template files (unless you custom program it). I run Wordpress, and I have only seen it accomplished category by category.
http://codex.wordpress.org/Category_Templates
Related
I am making this wordpress based website ( https://naujas.pacopac.lt/ ), it is for company with multiply product categories and in every category page I want to have filter system by different attributes.
I tried to create page for every category, but the problem is that I can add products of certain category, but I can not filter them then. Also I can only add filtering through widget.
So the way i see to make it is by directing people to product category page, like https://naujas.pacopac.lt/product-category/“name of category”/. For example https://naujas.pacopac.lt/product-category/pakuotes/ , add widget with filtering and then it works. BUT every category has to be filtered with different attributes, and I am only able to add one same widget to all categories pages and I can not find a way in WordPress to edit every each of these category pages, also I can only make one side widget.
So in short the problem is, how can I make different Side widgets and edit every each of product category pages with different widgets? I am using uncode theme with woocommerce and visual composer, would like to avoid coding, but also have basic knowledge in it so something not too complicated could be done.
Thank you very much guys!
Solved with Widget Logic plugin, able to show widgets on certain pages and hide others
I need to assign category for pages,i have tried many of the results found in google search . But while adding a category for Pages it automatically reflects in Posts also. Also tried few plugins (https://wordpress.org/plugins/create-and-assign-categories-for-pages/) . Is there an option for adding categories for pages alone ?
You can create a custom module instead ? with page capabilities and put supports "page_attributes"
What is the purpose to divide the pages? If you want to relate a group of pages create a parent page and use that! it can be used like a category.
As per the title,
I am using a accordion menu that displays my categories and sub categories.
If a category has any children i wish the results to be displayed using my modified archive.php. However if there are no children i wish for the post to be displayed on single.php.
many thanks in advance.
Simon
A while back I wrote a plugin called Category Template Hierarchy, it will easily let you accomplish what your trying to do by the fact that it lets you create templates specifically for templates that are parents.
It won't use archive.php, but it will allow you to create a template called parent-category.php. Anything that is not a parent will be ignored.
Additionally, the plugin gives you access to a conditional tag is_parent_category().
The thing (wordpress) is how can I make wordpress to format in a specific way (diferent from others) posts related to a certain category (it was in loop-single right?)
Does anyone have a nice link about this?
THX!
You'll want to use WordPress' Category Templates. For example if you have a category named news you can create template file named category-news.php (make sure you have permalinks enabled) or you can use the category ID. From there modify the contents of the category-news.php using CSS classes or IDs to display the styling you want for the category.
I have a little question. I am making a wordpress template that uses custom page templates. Now i ran into a problem. I want to create a page with a intro text and blog posts that come from a certain category. When a user creates a new page, I want them to be able to select the category from witch the posts are shown. Kinda like a drop down box with category's from where they can select the category they want. Does anyone maby knows a tutorial where I could learn how to do this ?
I mean something like this: http://imageshack.us/photo/my-images/10/naamloosea.jpg/
I already searched google but I could only find tutorials on how to make a template options page.
Thanks in advance,
Bob
You would want to create a Meta Box to save the category as a custom field entry within Pages. In here you could list the categories within a select box. You could then use this in the page template to pull in the posts from that category as you wish. I'll see if I can dig out a decent tutorial for this.
I did a quick search and found the following plugin for WordPress that may be of use... http://wordpress.org/extend/plugins/map-categories-to-pages/