Allow multiple taxonomy to show in category tag spot and tag spot

Posted in: Newspaper
Post count: 14

I don’t know if there is a place where users can share code customization so I am posting here.

I wanted to reply to this question of showing multiple taxonomy for custom post type as ‘tag_spot_taxonomy’ and ‘category_spot_taxonomy.

you can do this by:

1/modifying this file (child theme does NOT work):
Newspaper/includes/wp_booster/wp-admin/panel/views/ajax_boxes/td_panel_cpt_taxonomy/td_get_cpt_settings_by_post_type.php
search for ‘tds_category_spot_taxonomy’ and for ‘tds_tag_spot_taxonomy’
at each location change ‘td_panel_generator::dropdown’ to ‘td_panel_generator::input’

This will allow you to list your taxonomy slug in the theme page/cpt&tax/ for your CPT
Separated by comma, no spacing. Exemple : taxo1,taxo2,taxo3

2/ modifying this file (you CAN copy it in your child theme):
/newspaper/includes/wp_booster/td_module_single_base.php

replace line 185
$category_spot_taxonomy = td_util::get_ctp_option($this->post->post_type, ‘tds_category_spot_taxonomy’);
by this
$category_spot_taxonomy = td_util::get_ctp_option($this->post->post_type, ‘tds_category_spot_taxonomy’);
$arr = explode(“,”, $category_spot_taxonomy);
foreach ($arr as $value) {
$category_spot_taxonomy = $value ;
also add one }, right before the ‘} else {‘

you also need to the same for the tag locaiton
reaplce line 602 by this
$tag_spot_taxonomy = td_util::get_ctp_option($this->post->post_type, ‘tds_tag_spot_taxonomy’);
$arr = explode(“,”, $tag_spot_taxonomy);
foreach ($arr as $value) {
$tag_spot_taxonomy = $value ;
also add one } right before the comment ‘// also update …’

Hopefully you get the idea 😉

Too bad Tagdiv td_panel_generator function doesn’t offer an option to create radio selection with multiple choices, that woudl have been really clean !!!

PLEASE TAGDIV implement this code, it is really usefull ! and easy for yuo to implement now 😉

Post count: 22421

Hi,
Thank you for posting this solution. I’m sure it will help a lot of people. I will add this solution on our list but the developers will decide if it will get implemented.
Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.