Помощник
|
информер |
GregoreyBes
|
Сообщение
#1
|
||
|
|
||
|
|||
Anonym |
10.2.2013, 1:23;
Ответить: Anonym
Сообщение
#2
|
|
mysql_query("SELECT*FROM img order by `id` DESC LIMIT 8");
|
|
|
GregoreyBes
|
Сообщение
#3
|
|
маловато будет
|
|
|
Anonym |
10.2.2013, 11:32;
Ответить: Anonym
Сообщение
#4
|
|
|
|
|
GregoreyBes
|
Сообщение
#5
|
|
да у меня есть впринцепи скрипт но он сильно огромный и какаята точечка над каждой картинкой, немогу убрать http://aquiloni.org/zimovka-pchel-chast-2 (внизу под статьей)
<!-- последние статьи --> <?php function show_previous_posts_from_category ($the_post_id, $the_category_id = 0, $post_num) { $num = 0; global $wpdb; $sql = "SELECT wposts.* FROM $wpdb->posts wposts LEFT JOIN $wpdb->term_relationships ON (wposts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) WHERE $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id = '$the_category_id' AND wposts.post_status = 'publish' AND wposts.post_type = 'post' AND wposts.ID < '$the_post_id' ORDER BY wposts.ID DESC LIMIT $post_num"; $result = $wpdb->get_results($sql, OBJECT); global $post; ?> <?php foreach ($result as $post) { setup_postdata($post); ?> <li style="float:left; width:142px; height:200px;"> <a style="display:block; text-align:center; margin:0 auto;" href="<?php the_permalink() ?>" class="thumb_5"> <?php the_post_thumbnail('thumbnail', array( 'alt' => trim(strip_tags( $post->post_title )), 'title' => trim(strip_tags( $post->post_title )), )); ?> <h4><?php the_title(); ?></h4></a></li> <?php $num++; $save_ids[] = $post->ID; } if ( $num < $post_num || !$result ) { $need_more = $post_num-$num; $save_ids[] = $the_post_id; $save_ids = join (',', $save_ids); $more_posts = get_posts("numberposts=$need_more&category=$the_category_id&exclude=$save_ids"); foreach ($more_posts as $post){ setup_postdata($post); ?> <li style="float:left; width:142px; height:200px;"> <a style="display:block; text-align:center; margin:0 auto;" href="<?php the_permalink() ?>" class="thumb_5"> <?php the_post_thumbnail('thumbnail', array( 'alt' => trim(strip_tags( $post->post_title )), 'title' => trim(strip_tags( $post->post_title )), )); ?> <h4><?php the_title(); ?></h4></a></li> <?php } } ?> <?php } ?> <?php $the_cat = get_the_category(); $the_cat_id = $the_cat[0]->cat_ID; show_previous_posts_from_category($post->ID, $the_cat_id, 8); wp_reset_query(); ?> <!-- последние статьи --> |
|
|
A1ex_hb |
10.2.2013, 12:41;
Ответить: A1ex_hb
Сообщение
#6
|
|
Точечки убираются так:
<li style="float:left; width:142px; height:200px;"> нужно заменить на <li style="float:left; width:142px; height:200px; list-style-type:none;">
|
|
|
GregoreyBes
|
Сообщение
#7
|
|
|
Спасибо огромное
Senks
|
|
|
||
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
HTML информер погоды - помогите новичку | 2 | ks8re | 4809 | 11.2.2014, 16:14 автор: -ks8re- |
|
Информер тв-программы | 0 | victor_as | 8276 | 25.1.2014, 18:17 автор: -victor_as- |
|
Информер погоды | 1 | MisterDikiy | 1213 | 23.5.2012, 10:57 автор: 24meteo |
Текстовая версия | Сейчас: 19.4.2024, 9:59 |