Witam,

Mam pewien problem z kodem odpowiedzialnym za newsy mianowicie chodzi mi o to żeby na końcu newsa było tło.

  1. <?php
  2. global $post, $query_string, $SMTheme;
  3. query_posts($query_string);
  4. $i=1;
  5. if (have_posts()) :
  6.  
  7. if (!isset($_GET['ajaxpage'])) {?>
  8. <dl class='articles'>
  9. <?php }
  10. while (have_posts()) : the_post();
  11. ?>
  12. <dt id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <?php if (!is_single()&&!is_page()) { ?>
  14. <h2><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>" class='post_ttl'><?php the_title(); ?></a></h2>
  15. <?php } else { ?>
  16. <h1><?php the_title(); ?></h1>
  17. <?php } ?>
  18. <p><?php if (!is_page()) {?> autor <?php the_author_posts_link() ?> <?php echo get_the_date(); ?> <img alt="" src="<?php echo get_template_directory_uri(); ?>/images/smt/category.png"><?php the_category(',&nbsp;'); }?>
  19. <?php if(comments_open( get_the_ID() )) {
  20. ?><img alt="" src="<?php echo get_template_directory_uri(); ?>/images/smt/comments.png">&nbsp;<span class="meta_comments"><?php comments_popup_link( $SMTheme->_( 'noresponses' ), $SMTheme->_( 'oneresponse' ), $SMTheme->_( 'multiresponse' ) ); ?></span><?php
  21. }
  22. ?><?php edit_post_link( $SMTheme->_( 'edit' ), '&nbsp;&nbsp;|&nbsp;&nbsp;<span class="edit-link">', '</span>' ); ?></p>
  23. </dt>
  24. <dd>
  25. <?php
  26. if(has_post_thumbnail()) {
  27. ?><?php if (!is_single()) { ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail(
  28. array($SMTheme->get( 'layout', 'imgwidth' ), $SMTheme->get( 'layout', 'imgheight' )),
  29. array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
  30. ); ?></a><?php } else { ?>
  31. <?php the_post_thumbnail(
  32. array(278, 173),
  33. array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
  34. ); ?>
  35. <?php }
  36. }
  37.  
  38. if (!is_single()&&!is_page()) {
  39. smtheme_excerpt('echo=1');
  40. ?><a href='<?php the_permalink(); ?>' class='readmore'><?php echo $SMTheme->_( 'readmore' ); ?></a><?php
  41. } else {
  42. the_content('');
  43.  
  44. }
  45. ?>
  46. <?php wp_link_pages(); ?>
  47. </dd>
  48. <?php endwhile; ?>
  49.  
  50. <?php if (!isset($_GET['ajaxpage'])) {?>
  51. </dl>
  52. <?php } ?>
  53.  
  54.  
  55. <?php endif; ?>



w css mam ustawione tak:

  1. .articles dt {
  2. background:url('images/news-bg.jpg') no-repeat center top;
  3. padding:0;
  4. margin:0 30px;
  5. margin-top:-1px;
  6. padding-top:1px;
  7.  
  8. }
  9. .articles dt:first-child {
  10.  
  11. }
  12. .articles dd {
  13.  
  14. }


I tak jak początek newsa ma już tło to teraz nie za bardzo wiem jak zrobić by był jeszcze na jego zakończeniu.

Z php ostatnio miałem bardzo dawno styczność i nawet nie pamiętam takich znaczników jak <dt> itd. bardziej mi przychodzi do głowy <div> ale to do html i chyba ciężko było by to tutaj wpiąć.