Templating within a plugin – WordPress

I need to create a plugin used to create a part of a web page.

Therefore, it would be very useful for me to create a php template to be used by the plugin to generate the content.

Read More

Unfortunately, I can’t find anything within the Plugin API and I’m quite confused about it right now.


The plugin needs to generate a list of images. Simple HTML with a for loop.

I would like to avoid this:

function insert_gallery(){

    $images = $SQL_QUERY();
    for(...){
        echo 'string'+$variable+'string'+$method()+'string'+$variable;
    }

}

add_action('insert_gallery', 'insert_gallery')

Help would be amazing. 🙂

Related posts

Leave a Reply

1 comment