Hi,
Display the category in blocks work with normal posts but not with custom taxonomy.
Here is what I did as a easy test:
1. Create a normal post with “Category” : news
2. Upload and active your “td-custom-post-type.zip”
3. Create a new book with a new “Genre”, example: horror
4. Create a new page “BOOKS”
5. Edit with “TagDiv Composer”
6. Add a new “block 12” section
7. Change “Post Type” to include “td_book, post”
8. Save
9. Verify you have these settings in the Newspaper theme
Block setting -> Category tag on Modules/Blocks -> Module 11 = ON
CPT & Taxonomy -> Books -> Category Spot Taxonomy = Genres
10. Go to your new page “BOOKS”
The category “news” is shown on the normal post, but the category/genre “horror” is not shown on the book post.
Am I missing anything or?
Hi,
Maybe you can you point me in the right direction how to add the taxonomy tag next to the category tag on the posts.
Im not a developer but it looks like your function get_category in includes/wp_booster/td_module.php do something with taxonomy. Can it be altered to show what I want?
-
This reply was modified 8 years by
jOOc.
Hi,
The modules display a set of predefined meta, a taxonomy is not part of this information, at the moment.
The module files are found here – https://www.screencast.com/t/i19PlFjMw
The corresponding functions are here – https://www.screencast.com/t/UZwHBNhPCO
These are some somewhat similar topics that might have useful information if you would like to implement this
– https://forum.tagdiv.com/topic/custom-taxonomy-or-custom-query-for-newspaper-blocks/
– https://forum.tagdiv.com/topic/filter-blocks-by-custom-taxonomies/
– https://forum.tagdiv.com/topic/how-to-add-taxonomy-filter-in-block-filter-settings/
Thanks
Hi,
Thank you but Im not that good with php/wordpress.
But I found this in wp_booster/td_module.php
Shouldn’t that pick up my custom post type/taxonomy?
function get_category() {
if (array_key_exists($current_post_type, $builtin_post_types)) {
// default post type
} else {
// custom post type
And if I use the built in “Category” taxonomy in my custom post type the get_category works in loop-single.php but not in td_module_11.php
Hi,
The modules are not intended to display taxonomies, only categories will be displayed as tags. A modification like this would not be simple, and require a lot of testing for multiple situations. If there was a simple solution I would happily give it to you. Maybe this option will be available by default in future theme updates, but I cannot say for sure.
Thanks
Hi,
The functions are different for modules and post pages. In addition to the file mentioned above where the function for modules is defined, this is where the posts get the categories
– https://www.screencast.com/t/l7NYtNj7SU9R
Maybe it would be best to try and use the default theme options if possible, for the moment. There might be modification in this matter in a later update, and something like this will be available by default. Sorry of this is an inconvenience for you.
Thanks