Registering Custom Widgets from inside tagDiv API Plugin

Posted in: Newspaper
Post count: 108

Hi Guys, we’ve recently moved the registration of our custom blocks across to an API plugin but it doesn’t include the option for registering any of the custom blocks as widgets, we currently have to do this from within the parent theme via the td_page_builder_widgets.php file located in newspaper>includes>widgets.

Is there any way by which we can register the new blocks as widgets from within the API plugin?

Thanks
Matt

Post count: 23312

Hi Matt,

Unfortunately, the theme has not been tested in this case but please notice that you can use the shortcodes of your blocks (newly created blocks for example) and add them inside your widgets section. -> https://www.screencast.com/t/GsH43y3E2zx6

Thanks for your understnading!

Post count: 108

Hi Catalin, by doing what you suggest we don’t have the full control over the widget settings, we’d have to create the widget in a page elsewhere each time before cutting and pasting in the full short code?

Are we still safe to register the widgets in the parent theme using the method we’re already accustomed to?

Thanks
Matt

Post count: 22421

Hello,

Unfortunately yes, if you want to use a block that is not available among the widgets. As an alternative, you can simply use templates in the cloud library that do not need the widgets area s you can create the sidebar directly on the template using the tagdiv composer. Then you do not have to go back and forth between the tagdiv composer and the widgets area. You can read more about the cloud library here: https://tagdiv.com/category/documentation/cloud_library/

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.