• Resolved jillg

    (@jillg)


    Hi Everyone

    On my website for each post I have an Amazon image link. I want to arrange these posts so they appear in a grid-like fashion (maybe 3 or 4 across) rather than below each other as in a traditional blog.

    I only want to do this for the category templates.

    my website is:
    https://kidstrongbooks.com/wordpress/?cat=7

    Thanks for your help

    Jill

Viewing 7 replies - 1 through 7 (of 7 total)
  • I do not use the Suffusion theme, but it seems that this may be an option under Admin->Suffusion->Blog Features->Layout: Excerpt / List / Tile / Full ->Category Page Setting->Display Tiles.

    Thread Starter jillg

    (@jillg)

    thank you very much. it almost worked. the only thing that is missing is the amazon iframe image. The grid only shows the title of the post. almost there. Any suggestions?

    thanks for your help
    Jill

    Sorry, I can’t find any info on displaying iframes in an excerpt. You might want to start a new thread with that in the title. Maybe someone else can give you an answer.

    Thread Starter jillg

    (@jillg)

    thanks for your help
    Jill

    @jillg, how do you put the Amazon links in the posts? Is it done with a plugin or shortcodes, or do you just hand enter the link info?

    @jillg, make a backup copy of themes/suffusion/layouts/layout-tiles.php. Then, just before this code (line 94),

    if (($suf_tile_images_enabled == 'show') || ($suf_tile_images_enabled == 'hide-empty' && $image_link != '')) {
    				$ret .= "\t\t<div class='suf-tile-image'>".$image_link."</div>\n";
    			}

    add the code below so it looks like this:

    $content = apply_filters('the_content',get_the_content());
             if (strpos($content,'rcm.amazon.com')) {
               if (preg_match('#(<iframe .+</iframe>)#',$content,$matches)) {
                 $image_link = $matches[1];
               } else {
                 $image_link = '';
               }
             } else {
               $image_link = '';
             }			if (($suf_tile_images_enabled == 'show') || ($suf_tile_images_enabled == 'hide-empty' && $image_link != '')) {
    				$ret .= "\t\t<div class='suf-tile-image'>".$image_link."</div>\n";
    			}

    You also need to set the ‘Thumbnail container height for excerpts’ under Admin->Suffusion->Blog Features. A value of 250 will probably be OK.

    Thread Starter jillg

    (@jillg)

    wow – thank you very much.

    I insert the amazon links in the html tab of the posting.

    I have a very kluge workaround so I’ll try what you’re suggesting.

    Jill

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I want to put Amazon image links in a grid’ is closed to new replies.