How to customize block in child theme

Hi,

I want to customize left bar blocks into child theme, can i do it?
I’m trying copying plugins/blocks/ files into plugins/themes/childtheme/plugins/blocks directory but it doesn’t work.
Do you have any advice?

Hi @Cristhian_Andres_Rey,

The block presentation isn’t a function of the themes – all themes should present the sidebar more or less the same, with the exception of styling changes via CSS. Can you describe in more detail what you’d like to accomplish?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher thanks for the faster reply,

I want to make my own block in sidebar but i want to put my new blocks into a child theme.
I will like to make all the changes (code and css) in my child theme, only for give it some order and not forget where I made some changes, but in your answer I can check that child themes only changes templates and styles not plugins or lib archives.

It would be amazing that i can add or change some plugins into child themes! please tell me if I would make it in the future!

Best Regards,

Cristhian Rey

Hi @Cristhian_Andres_Rey,

I can’t think of any way to encapsulate block plugins within theme plugins, but you can of course write block plugins outside your theme plugin, like any of the existing block plugins currently do.

It may be that you can register block plugins from within theme plugins – similarly to e.g. how the web feed plugin registers its own gateway plugin – but I haven’t tested the plugin lifecycle to see whether this would work as expected.

Regards,
Alec Smecher
Public Knowledge Project Team