I have a custom post type in which you can choose different taxonomies. This taxonomies are listed in the page of single custom post type. When clicking on one of this taxonomy, I would the user to be redirect to a specific taxonomy page that show different informations about that taxonomy.
How can I do that with word press?
I'm using bones framework.
There is no category.php in this framework.. So i found this file:
taxonomy-custom_cat.php
in which is written:
"This is the custom post type taxonomy template. If you edit the custom taxonomy name, you've got to change the name of this template to reflect that name change.
i.e. if your custom taxonomy is called
register_taxonomy( 'shoes',
then your single template should be taxonomy-shoes.php"
I did it but it doesn't work
PS: the taxonomy is called "agenti-biodeteriogeni"
Thank you
Make the copy of your category.php file and name it as your 'customposttype-category(taxonomy-name).php' this will display information of taxonomy like category.
Related
I have a main custom taxonomy page templates which call "product" it will show all the product in a single page.
But I have lot of sub taxonomies under product wanna show each in different page.
I know I can create as much as taxonomies categories page for each sub category but is there any way I can do it with a single template to fulfill all the looping?
You don't need to create pages for each taxonomy term, you could create a file called taxonomy-{taxonomy}.php in your theme's directory (which {taxonomy} is the name of taxonomy you crated) and it will load for each taxonomy term you create. for more information read Taxonomy Templates docs.
I register new custom taxonomy named "portfolio" using Custom Post Type UI plugin. Then create template taxonomy-portfolio.php and loop posts, expecting that when I type mysite.com/portfolio in browser, will get it. It works only when I get term of this taxonomy, I see this template, otherwise redirecting on 404. How can I use taxonomy template for archive?
For the custom post type "Product" in Woocommerce, I wish to create a custom archive page for the taxonomy "Seating".
According to the Wordpress codex the order should be "archive" then "post type" then "taxonomy"
I have therefore tried the following file names:
archive-product-seating.php
category-product-seating.php
archive-product-category-seating.php
category-product-category-seating.php
Is it possible to create a specific template for a specific taxonomy of a post type? if so, how is this named?
I also understand that this could be achieved by using conditional logic... I'm trying to not do this though.
According to this page https://developer.wordpress.org/themes/basics/template-hierarchy/ (picture is very useful) filename should be taxonomy-product-seating.php
I am working on a wordpress website.I used genesis theme. I created custom post type and custom taxonomy to this site.And also created some categories to this post type.I want to customize the category page i.e.http://example.com/taxonomy-slug/category-name. Can anyone know please let me know what changes are necessary to customize the category page.
"taxonomy-{taxonomy}-{term}.php – If the taxonomy is sometax, and taxonomy’s term is someterm, WordPress will look for taxonomy-sometax-someterm.php. In the case of post formats, the taxonomy is ‘post_format’ and the terms are ‘post-format-{format}. i.e. taxonomy-post_format-post-format-link.php for the link post format.
taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php."
source https://developer.wordpress.org/themes/basics/template-hierarchy/
so if you have for example custom taxonomy with slug "color" and have term with name "red" you just create taxonomy-color-red.php.
I am new in WordPress world. I created custom post successfully and I displayed it on page template page. Now I want to use taxonomy-{category}.php and single-{post}.php for displaying custom post but I am confused in taxonomy page and single page. How can I achieve this?
In taxonomy-{category}.php here category means our custom category name or others?
In single-{post}.php here post means custom post name or others?
See the Template_Hierarchy on the Wordpress Codex
taxonomy-{taxonomy}.php - If the taxonomy were sometax, WordPress
would look for taxonomy-sometax.php
single-{post_type}.php - If the post type were product, WordPress would look for single-product.php.
Example:
For post_type
When on an online store custom post type in the backend, the URL would be wp-admin/edit.php?post_type=store.
So the post_type in this case is store, which means I will name my file single-store.php
For taxonomy
When on the Categories page for the online store in the backend, the URL would be edit-tags.php?taxonomy=store_categories&post_type=store
So the taxonomy file would be taxonomy-store_categories.php
In taxonomy-{category}.php here category means our custom category name or others?
taxonomy-{category}.php here category means your custom category(taxonomy)
In single-{post}.php here post means custom post name or others?
single-{post}.php here post means custom post type name