Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kilrizzy

    (@kilrizzy)

    For example, my plugin: custom.php

    add_shortcode( 'custom_form', 'custom_form_run' );
    function custom_form_run($attributes){
        $content = (imported and processed twig file);
        return $content;
    }
    Plugin Author jarednova

    (@jarednova)

    easy. Just had to do this last week on a client project:

    add_shortcode( 'custom_form', 'custom_form_run' );
    
    function custom_form_run($attributes){
         $content = Timber::compile('my-form.twig', $attributes);
         return $content;
    }

    Thread Starter kilrizzy

    (@kilrizzy)

    Awesome, I’ll try this out thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using Timber with other plugins’ is closed to new replies.