WordPress.org

Ready to get started?Download WordPress

Forums

Smart Archives Reloaded
[resolved] Custom templates? (2 posts)

  1. TJ Kelly
    Member
    Posted 9 months ago #

    Is it possible to customize the HTML templates loaded by Mustache? I don't want to overwrite the 7 HTML files that came with the plugin. I want to create my own and tell SAR to use them. Is this possible somehow, without modifying the plugin's code?

    http://wordpress.org/plugins/smart-archives-reloaded/

  2. TJ Kelly
    Member
    Posted 9 months ago #

    After enough digging, I found this line in generator.php:

    $template_path = locate_template( 'sar-templates/' . $file );

    I had to google wordpress' "locate_template()" function, but I discovered that the above line tells the generator to look for a folder called "sar-templates" in my theme directory. If it doesn't find that folder, it uses its own templates.

    But, if it DOES find an sar-templates folder in my theme directory, it uses those templates instead of its own!

    Exactly what I needed. Thanks...for reading, I guess?

Reply

You must log in to post.

About this Plugin

About this Topic