• Resolved tlouwet

    (@tlouwet)


    I’ve made a few custom mail blocks, but every time the plugin gets updated, they’re removed.
    I’ve tried adding them to my theme, but then they don’t show up.

    Is there a way for them to be visible from within the theme dir?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stefano Lissa

    (@satollo)

    Hi, have you follow the instructions in our developers area to create custom blocks?
    They must be placed in a theme or custom plugin, not inside the Newsletter folder.

    What is the address ?
    Thanks

    • This reply was modified 4 years, 10 months ago by Alain Aubry.
    Thread Starter tlouwet

    (@tlouwet)

    @satollo

    Seems to be my bad I think.
    I thought simply adding them to the theme’s folder was enough, theme/newsletter/emails/blocks/, placing the custom blocks in there. Not certain where I read that.

    https://www.thenewsletterplugin.com/documentation/developers/dev-composer-blocks/
    Followed the instructions there.
    Made a custom plugin with

    add_action('newsletter_register_blocks', function () {
    	TNP_Composer::register_block(__DIR__ . '/custom-block'); //for each block
    });

    in the plugin php and that did it.

    So “issue” fixed ??
    Thanks for the quick response.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom mail blocks’ is closed to new replies.