Error 404 page when i try view my custom taxonomy - wordpress

I using custom post type
In the admin interface that displays the number of posts of custom post type by custom taxonomy on but when access (view), the custom taxonomy returns 404.
Custom post type oto
custom taxonomy oto-models
when I view the oto-404 models.

did you flushed the rewrite rules? otherwise the new taxonomys won't work.
just add flush_rewrite_rules(); and remove it after one request.
http://codex.wordpress.org/Function_Reference/flush_rewrite_rules

Related

Wordpress custom taxonomy template doesn't display archive page

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?

How can i remove custom post type slug and add taxonomy

My question is about custom post rewrite url
On may page i have custom post type products
I have custom post type slug name - products and taxonomy - category.
I have urls like this:
domain.com/custom_post_type/product_name
but i need
domain.com/taxonomy/product_name
Is this acheivable?
To change the URL in wordpress go to settings -> permalinks
You can either choose a default permalink or create your own in this case.
https://codex.wordpress.org/Settings_Permalinks_Screen

WordPress custom post templates

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

Create custom page for each taxonomy

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.

widget logic on custom product type taxonomy

I created a custom post type by the custom post plugin and now i created new post-type by taxonomy. My requirement is that how can i use the widget logic in that taxonomy page.
i used the following code in the widget for widget logic and i cant get any result for that.
is_tax('branes-range')||is_single()&&(get_post_type()=='products');
this is taxonomy 'product-types' page and i have created is under products custom post and 'branes-range' is taxonomy type. Now i want to get the widget logic in 'branes-range' page.
Use this widget Logic:
is_tax('your_taxonomy_name', 'your_taxonomy')
Here no need to use the Post type name.

Resources