Support » Plugin: Smart Archives Reloaded » [Plugin: Smart Archives Reloaded] Add thumbnail image to fancy.html

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m no expert, but I believe I may have succeeded in doing just that last night.

    In the generator.php file, I added this:

    protected function substitute_thumbnail( $post ) {
    		return the_post_thumbnail( array(65,65) );

    right after the end of the

    function substitute_category( $post )


    THEN, in the core.php file, I added “%thumbnail%” to the list of shortcodes, as such:

    static function get_available_tags() {
    		return array(
    			'%author_link%', '%author%',
    			'%category_link%', '%category%', '%thumbnail%',

    Be sure to back up and save. I did it wrong the first time and had to manually delete the plugin and reinstall it before I could get back into wordpress. But the second time, it worked like a charm.

    But I’ve NEVER done anything like this before. I don’t know code. I simply guessed (based on patterns I saw in the code), and was flabbergasted and did a little dance when it worked. YAY!

    To clarify, this should allow you to use the %thumbnail% shortcode.

    Thanks for the information.

    Did you have to make any changes to:

    function generate_fancy() {

    within the file generator.php ?

    For example, in function generate_fancy() Ive added this:
    ‘archive-image’ => “<img src='”.$thumbnail.”‘ border=’0’>”,

    and fancy.html, made this change:
    <ul class=”archive-list”>
    <h2>{{{archive-image}}} {{{post-list}}}</h2>

    However, no image is showing up, so I guess the variable $thumbnail is not applicable in this scenario as when I view the HTML page, I can see <img src=” border=’0′>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Smart Archives Reloaded] Add thumbnail image to fancy.html’ is closed to new replies.