Запрет title у миниатюр

(Ответов: 10, Просмотров: 1952)
Страница 1 из 2 12 Последняя
  1. Новичок
    • Регистрация: 26.03.2011
    • Сообщений: 15
    • Репутация: 10
    Добрый день, как можно убрать вывод title у загруженных миниатюр, дело в том, что при наведении на картинку у меня выводиться имя файла, которое зачастую не очень красивое :) Сайт - www.realitynews.ru
    • 0
  2. Гуру Аватар для Dr. Kronos
    • Регистрация: 03.09.2009
    • Сообщений: 705
    • Репутация: 79
    Добавь атрибут со значением
    title="<?php the_title(); ?>"
    Там, где выводится твоя картинка
    • 0
  3. Новичок
    • Регистрация: 26.03.2011
    • Сообщений: 15
    • Репутация: 10
    Не действует это

    ---------- Сообщение добавлено 13:01 ---------- Предыдущее 12:52 ----------

    Помогите кто-нибудь?
    • 0
  4. Гуру Аватар для Dr. Kronos
    • Регистрация: 03.09.2009
    • Сообщений: 705
    • Репутация: 79
    Ты просто не там вставляешь =) Вообще, странно просить помощи, не дав никакой инфы. Хотя бы имена файлов выложил. Код index.php.
    Доктор еще)))
    • 0
  5. Software Engineer Аватар для Zvеr
    • Регистрация: 07.02.2010
    • Сообщений: 603
    • Репутация: 228
    • Webmoney BL: ?
    Для картинки вроде как alt высвечивается, попробуйте указать alt="<?php the_title(); ?>".
    • 0
  6. Гуру Аватар для Dr. Kronos
    • Регистрация: 03.09.2009
    • Сообщений: 705
    • Репутация: 79
    Zvеr, alt - это то, что видно, когда картинка не доступна. Текстовая альтернатива.
    • 1
  7. Software Engineer Аватар для Zvеr
    • Регистрация: 07.02.2010
    • Сообщений: 603
    • Репутация: 228
    • Webmoney BL: ?
    Dr. Kronos ясно, я почему-то всегда думал что наоборот :) ну в лубом случае лучше и там и там прописать...
    • 0
  8. Новичок
    • Регистрация: 26.03.2011
    • Сообщений: 15
    • Репутация: 10
    Выкладываю код index.php полностью:


    <?php
    global $options;
    foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
    }
    ?>
    <?php get_header(); ?>

    <?php if ( $paged < 2) { ?>


    <?php
    $args = array('showposts' => 5, 'orderby' => 'date', 'order' => 'DESC');

    $featType = $wpzoom_featured_type;

    if ($featType == 'Tag')
    {
    $args['tag'] = "$wpzoom_featured_slug"; // Breaking tag slug
    }
    elseif ($featType == 'Category')
    {
    $args['cat'] = "$wpzoom_featured_slug"; // Breaking tag slug
    }
    ?>

    <div id="featuredStories">
    <div id="featuredMain">

    <?php

    query_posts($args);
    $i = 0;

    while (have_posts()) : the_post();
    $i++;

    ?>
    <div id="tabcontent<?php echo"$i"; ?>">

    <div class="cover"><?php
    unset($img);

    if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
    the_post_thumbnail(array(450,600, true));
    }

    else{

    if ($wpzoom_cf_use == 'Yes')
    {
    $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
    } // if CF used
    else
    {
    if (!$img)
    {
    $img = catch_that_image($post->ID);
    }
    } // if CF not used

    if ($img)
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=450&amp;w=600&amp;zc=1&amp;src=<?ph p echo $img ?>" /></a>
    <?php
    }
    else
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/images/no-photo.png" width="440" height="250" /></a><?php
    } // if $img still does not exist

    } // if theme does not have a thumbnail


    ?></div><!-- end .cover -->
    <h2><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <p class="postmetadata"><span class="timestamp"><?php the_time('F j, Y'); ?></span> | <span class="category"><?php the_category(', '); ?></span> | <span class="comments"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('Комментарии отсутствуют','1 comment','% comments'); ?></a></span><?php edit_post_link( __('РЕДАКТИРОВАТЬ'), ' | ', ''); ?></p>
    <p><?php the_content_limit(240, ''); ?></p>
    <p class="more"><a href="<?php the_permalink(); ?>" rel="bookmark" title="">Читать полностью &raquo;</a></p>
    </div><!-- end #tabcontent<?php echo"$i"; ?> -->
    <?php endwhile; // end tabcontent creation ?>
    </div><!-- end #featuredMain -->

    <div id="featuredList" class="menu">
    <h4>Главные новости</h4>
    <ul>
    <?php

    query_posts($args);
    $i = 0;

    while (have_posts()) : the_post();
    $i++;
    ?>
    <li onmouseover="easytabs('1', '<?php echo "$i"; ?>');" onfocus="easytabs('1', '<?php echo "$i"; ?>');" title="" id="tablink<?php echo "$i"; ?>">
    <div class="featuredStory">
    <?php
    unset($img);

    if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
    the_post_thumbnail(array(60,60, true));
    }

    else{

    if ($wpzoom_cf_use == 'Yes')
    {
    $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
    } // if CF used
    else
    {
    if (!$img)
    {
    $img = catch_that_image($post->ID);
    }
    } // if CF not used

    if ($img)
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=60&amp;w=60&amp;zc=1&amp;src=<?php echo $img ?>" class="cover" title=""/></a>
    <?php
    }
    else
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/no-photo-s60.png" width="60" height="60" class="cover" /></a><?php
    } // if $img still does not exist

    } // if theme does not have a thumbnail


    ?>
    <div class="content">
    <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p><?php the_content_limit(200, ''); ?></p>
    </div>
    <div class="cleaner">&nbsp;</div>
    </div><!-- end div.featuredStory -->
    </li>
    <?php endwhile; ?>
    </ul>
    </div><!-- end #featuredList, div.menu -->

    <div class="cleaner">&nbsp;</div>
    </div><!-- end #featuredStories -->


    <?php if ($wpzoom_featured_cats_show == 'Yes') { ?>
    <div id="featuredCats">
    <?php
    unset($catid);
    $catid = $wpzoom_featured_category_1;

    if ($catid)
    {

    $cat = get_category($catid,false);
    $catlink = get_category_link($catid);

    $breaking_cat1 = "cat=$catid"; // Breaking tag slug

    // $temp_query = clone $wp_query;
    $my_query = new WP_Query("showposts=$wpzoom_featured_categories_po sts&$breaking_cat1&order_by=post_date&order=DESC") ;

    ?>
    <div class="category">
    <p class="header"><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></p>


    <?php
    $i = 0;
    while ($my_query->have_posts()) : $my_query->the_post(); update_post_caches($posts);
    $i++;
    if ($i == 1)
    {

    ?>
    <div class="post">
    <div class="cover">
    <?php
    unset($img);

    if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
    the_post_thumbnail(array(250,440, true));
    }

    else{

    if ($wpzoom_cf_use == 'Yes')
    {
    $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
    } // if CF used
    else
    {
    if (!$img)
    {
    $img = catch_that_image($post->ID);
    }
    } // if CF not used

    if ($img)
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&amp;w=290&amp;zc=1&amp;src=<?ph p echo $img ?>" /></a>
    <?php
    }
    else
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&amp;w=290&amp;zc=1&amp;src=<?ph p bloginfo('template_directory'); ?>/images/no-photo.png" /></a><?php
    } // if $img still does not exist

    } // if theme does not have a thumbnail


    ?></div>
    <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div>
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p><?php the_content_limit(140, ''); ?></p>
    <p class="more"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Читать полностью &raquo;</a></p>
    </div>
    <div class="sep">&nbsp;</div>
    <p class="header"><a href="<?php echo get_category_feed_link($catid, $feed ); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a><a href="<?php echo"$catlink";?>">Еще новости</a></p>
    <ul class="moreStories">
    <?php
    } // if first post ($i == 1)
    else
    {
    ?><li><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php
    }
    endwhile;
    if ($i > 0)
    {
    echo"</ul>";
    }
    ?>
    </div><!-- end div.category -->

    <?php
    }
    unset($catid);
    $catid = $wpzoom_featured_category_2;

    if ($catid)
    {

    $cat = get_category($catid,false);
    $catlink = get_category_link($catid);

    $breaking_cat2 = "cat=$catid"; // Breaking tag slug

    // $temp_query = clone $wp_query;
    $my_query = new WP_Query("showposts=$wpzoom_featured_categories_po sts&$breaking_cat2&order_by=post_date&order=DESC") ;

    ?>
    <div class="category">
    <p class="header"><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></p>


    <?php
    $i = 0;
    while ($my_query->have_posts()) : $my_query->the_post(); update_post_caches($posts);
    $i++;
    if ($i == 1)
    {
    ?>
    <div class="post">
    <div class="cover">
    <?php
    unset($img);

    if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
    the_post_thumbnail(array(250,440, true));
    }

    else{

    if ($wpzoom_cf_use == 'Yes')
    {
    $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
    } // if CF used
    else
    {
    if (!$img)
    {
    $img = catch_that_image($post->ID);
    }
    } // if CF not used

    if ($img)
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&amp;w=290&amp;zc=1&amp;src=<?ph p echo $img ?>" /></a>
    <?php
    }
    else
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&amp;w=290&amp;zc=1&amp;src=<?ph p bloginfo('template_directory'); ?>/images/no-photo.png" /></a><?php
    } // if $img still does not exist

    } // if theme does not have a thumbnail


    ?></div>
    <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div>
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p><?php the_content_limit(140, ''); ?></p>
    <p class="more"><a href="<?php the_permalink(); ?>" title="">Читать полностью &raquo;</a></p>
    </div>
    <div class="sep">&nbsp;</div>
    <p class="header"><a href="<?php echo get_category_feed_link($catid, $feed ); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a><a href="<?php echo"$catlink";?>">Еще новости</a></p>
    <ul class="moreStories">
    <?php
    } // if first post ($i == 1)
    else
    {
    ?><li><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php
    }
    endwhile;
    if ($i > 0)
    {
    echo"</ul>";
    }
    ?>
    </div><!-- end div.category -->

    <?php
    }
    unset($catid);
    $catid = $wpzoom_featured_category_3;

    if ($catid)
    {

    $cat = get_category($catid,false);
    $catlink = get_category_link($catid);

    $breaking_cat3 = "cat=$catid"; // Breaking tag slug

    // $temp_query = clone $wp_query;
    $my_query = new WP_Query("showposts=$wpzoom_featured_categories_po sts&$breaking_cat3&order_by=post_date&order=DESC") ;

    ?>
    <div class="category category-last">
    <p class="header"><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></p>


    <?php
    $i = 0;
    while ($my_query->have_posts()) : $my_query->the_post(); update_post_caches($posts);
    $i++;
    if ($i == 1)
    {
    ?>
    <div class="post">
    <div class="cover">
    <?php
    unset($img);

    if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
    the_post_thumbnail(array(250,440, true));
    }

    else{

    if ($wpzoom_cf_use == 'Yes')
    {
    $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
    } // if CF used
    else
    {
    if (!$img)
    {
    $img = catch_that_image($post->ID);
    }
    } // if CF not used

    if ($img)
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&amp;w=290&amp;zc=1&amp;src=<?ph p echo $img ?>" /></a>
    <?php
    }
    else
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&amp;w=290&amp;zc=1&amp;src=<?ph p bloginfo('template_directory'); ?>/images/no-photo.png" /></a><?php
    } // if $img still does not exist

    } // if theme does not have a thumbnail


    ?></div>
    <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div>
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p><?php the_content_limit(140, ''); ?></p>
    <p class="more"><a href="<?php the_permalink(); ?>" title="">Читать полностью &raquo;</a></p>
    </div>
    <div class="sep">&nbsp;</div>
    <p class="header"><a href="<?php echo get_category_feed_link($catid, $feed ); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a><a href="<?php echo"$catlink";?>">Еще новости</a></p>
    <ul class="moreStories">
    <?php
    } // if first post ($i == 1)
    else
    {
    ?><li><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php
    }
    endwhile;
    if ($i > 0)
    {
    echo"</ul>";
    }
    ?>
    </div><!-- end div.category -->

    <?php } ?>
    <div class="cleaner">&nbsp;</div>
    </div><!-- end #featuredCats -->
    <?php } // if show featured categories ?>
    <?php } // end if $paged
    wp_reset_query();
    ?>

    <div id="content<?php if ($paged > 1) {echo" content-archive";} ?>">
    <div id="posts">
    <p class="header"><a href="<?php if (strlen($wpzoom_misc_feedburner) < 10) { bloginfo('rss2_url');} else {echo"$wpzoom_misc_feedburner";} ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a> Последние новости</p>
    <div class="cleaner">&nbsp;</div>
    <?php
    $i = 0;
    $m = 0;
    while (have_posts()) : the_post();

    $i++;
    $m++;

    ?>
    <div class="post post-normal">
    <div class="cover"><?php
    unset($img);

    if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
    the_post_thumbnail(array(120,90, true));
    }

    else{

    if ($wpzoom_cf_use == 'Yes')
    {
    $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
    } // if CF used
    else
    {
    if (!$img)
    {
    $img = catch_that_image($post->ID);
    }
    } // if CF not used

    if ($img)
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=90&amp;w=120&amp;zc=1&amp;src=<?php echo $img ?>" /></a>
    <?php
    }
    else
    {
    ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/no-photo-s.png" width="120" height="90" /></a><?php
    } // if $img still does not exist

    } // if theme does not have a thumbnail


    ?></div>
    <div class="content">
    <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div>
    <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p class="postmetadata"><span class="category"><?php the_category(', '); ?></span> | <span class="timestamp"><?php the_time('F j, Y'); ?></span><?php edit_post_link( __('Редактировать'), ' | ', ''); ?></p>
    <p><?php the_content_limit(160, ''); ?></p>
    <p class="more"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">Читать полностью &raquo;</a></p>
    </div>
    </div>
    <?php if ($sep) {echo"<div class=\"sep\">&nbsp;</div>";} ?>
    <?php endwhile; ?>

    <div class="cleaner">&nbsp;</div>
    <div class="sep">&nbsp;</div>
    <div class="navigation pagerbox">
    <?php next_posts_link('&laquo; Older Entries') ?>
    <?php previous_posts_link('Newer Entries &raquo;') ?>
    </div>

    </div><!-- end #posts -->
    <?php get_sidebar(); ?>
    </div><!-- end #content -->
    </div><!-- end main wrapper -->
    </div><!-- end #main -->
    <?php get_footer(); ?>
    • 0
  9. Гуру Аватар для Dr. Kronos
    • Регистрация: 03.09.2009
    • Сообщений: 705
    • Репутация: 79
    wpzoom_featured теперь покажи
    • 0
  10. Новичок
    • Регистрация: 26.03.2011
    • Сообщений: 15
    • Репутация: 10
    Вот весь список файлов темы:

    admin_functions.php
    (admin_functions.php)
    timthumb.php
    (timthumb.php)
    Архивы
    (archive.php)
    Боковая колонка
    (sidebar.php)
    Заголовок
    (header.php)
    Комментарии
    (comments.php)
    Одна запись
    (single.php)
    Основной шаблон
    (index.php)
    Подвал
    (footer.php)
    Результаты поиска
    (search.php)
    Функции темы
    (functions.php)
    Шаблон автора
    (author.php)
    Шаблон страницы
    (page.php)
    Шаблон страницы «Blog Archives»
    (archives.php)
    Стили
    style_ie.css
    (style_ie.css)
    style_ie60.css
    (style_ie60.css)
    Список стилей
    (style.css)
    • 0
Страница 1 из 2 12 Последняя

Похожие темы

Темы Раздел Ответов Последний пост
Использование title в ссылках
Поисковые системы 14 13.11.2011 01:31
Title и h1
Вопросы от новичков 4 28.03.2011 12:19
Title в ВП
Web программирование 1 28.11.2010 12:46
Тэг Title – это важно!
Дайджест блогосферы 4 20.01.2010 09:35

У кого попросить инвайт?

Вы можете попросить инвайт у любого модератора:

Информеры