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

  1. TJ Kelly
    Posted 2 years 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?


  2. TJ Kelly
    Posted 2 years 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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Smart Archives Reloaded
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic