• Resolved agitana

    (@agitana)


    Hi there,
    i’ve startet a new Testsite with a new template for a blog on a local server. Now i’m trying to show thumbnails in the category-lists on the mainpage.
    now the problems:
    1.) the thumbnails don’t link to the related posts
    2.) the thumbnails are pushing other thumbnails in case the headline is not long enough (look the screenshot here)

    My php-code for this:

    <ul>
    			<?php } // if $x == 1
    			else { ?>
    
    			<li><?php the_post_thumbnail( array(60,45), $attr ); ?><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li><?php } // else ?>
    			<?php endwhile; //  ?>
    		</ul>

    And the style-css:

    [CSS code moderated – use the pastebin]

    Thx 4 your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • to include the thumbnail into the link, change the one line to:

    <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail( array(60,45), $attr ); ?><?php the_title(); ?></a></li><?php } // else ?>

    for the image alignment, you might need to add a ‘clear:left;’ to the relevant style of the image, link, or list item;

    try and work with a tool such as Firebug https://getfirebug.com/ to find out which style to edit.

    without a live link to your site (I know it is local…) there is not much more to suggest.

    Thread Starter agitana

    (@agitana)

    nice, thank you very much. i will clear:left try.
    firebug i’m already using.

    Thread Starter agitana

    (@agitana)

    hi, your code for the links to the thumbnails worked fine. clear:left didnt work. but i solved it another way. i gave the list elements a fixed hight and now it looks good. thx 4 your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Thumbnails in Category List’ is closed to new replies.