How do I create my own tdc_category?

Posted in: Newspaper
Post count: 22

I create a new block using the API function td_api_block::add. However, the parameter “category” is completely ignored and tdc_category accepts only default values.

If I set this parameter it will be ignored (https://forum.tagdiv.com/td_api_blockadd/).
If I use tdc_category Blocks, Extended or other the blocks are displayed in the middle of the default blocks.

But I want to group the blocks separately => https://prnt.sc/y5aybz


td_api_block::add('td_block_creative',
array(
'map_in_visual_composer' => false,
'map_in_td_composer' => true,
"name" => 'Facebook Page',
"base" => 'td_block_creative',
"class" => '',
"controls" => "full",
'tdc_category' => 'GoGames', <-- will not displayed when use a own groupname
'category' => 'GoGames', <--- will be ignored
'icon' => '',
'file' => $this->plugin_path . '/shortcodes/td_block_creative.php',

Post count: 21065

Hello!

Unfortunately, you can only write there an existing category, so you can not create one on your own without modifying the theme code and this will require custom work which is not covered by the support team.

Thank you for your understanding!

Post count: 22

Hi,
That the tdc_category cannot be changed is ok, but why is the parameter category itself ignored? The parameter is also meant for grouping.

Br

Post count: 21065

Hello!

For this line where ‘category’ is, you also need to mention an existing category, so it is not ignored at all.

Thank you for your understanding!

Post count: 22

Hello,

Sorry but this makes absolutely no sense. Your own documentation says
https://forum.tagdiv.com/td_api_blockadd/

category which best suites to describe functionality of this shortcode. Default category: Blocks. You can add your own category, simply enter new category title here

What is wrong now? The documentation or the code that does not take it correctly? This parameter has worked in the past. Maybe someone from the developers can take a look at what is not working here.

Post count: 21065

Hello!

The parameter “category” only works for Visual Composer which is an old plugin, but this isn’t still working for TagDiv Composer plugin. The only reason why this parameter was kept is for backwards compatibility.
In the case of “tdc_category”, you can only write there one of the categories displayed in this code list: https://prnt.sc/ye1j6v. So, you can not add your own category because it won’t be dynamically created. Also, in the documentation is doesn’t write about adding your own category here.
In the future, we will try to add this functionality too.

We are sorry for the inconvenience created!

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