Uporałem się sie częsciowo z wyświetlaniem miniatur, zmodyfikowałem linijkę w functions.php i teraz jest mała miniatura ale pozostały też puste pola gdzieś ze starej funkcji.
Co trzeba usunąc w tym kodzie żeby wyświetlały się tylko jedne miniatury a nie jakas szara ikonka powyżej i niżej mała miniatura?
poniżej kod:
`<?php
include 'theme_options.php’;
include 'guide.php’;
include 'slider.php’;
include 'metabox.php’;
/* SIDEBARS */
if ( function_exists(’register_sidebar’) )
register_sidebar(array(
'name’ => 'Sidebar’,
'before_widget’ => '<li class=”sidebox %2$s”>’,
'after_widget’ => ”,
'before_title’ => '<h3 class=”sidetitl”>’,
'after_title’ => '</h3>’,
));
/* CUSTOM MENUS */
register_nav_menus( array(
'primary’ => __( 'Primary Navigation’, ” ),
) );
function fallbackmenu(){ ?>
<div id=”submenu”>
- Go to Adminpanel > Appearance > Menus to create your menu. You should have WP 3.0+ version for custom menus to work.
</div>
<?php }
/* CUSTOM EXCERPTS */
add_filter( 'the_excerpt’, 'excerpt_thumbnail’ );
function excerpt_thumbnail($excerpt){
if(is_single()) return $excerpt;
global $post;
if ( has_post_thumbnail() ) {
$img .= ’ID).'”>’.get_the_post_thumbnail($post->ID, 'custom_thumb’).’’;
} else {
$img = ”;
}
return $img.$excerpt;
}
/* SHORT TITLES */
function short_title($after = ”, $length) {
$mytitle = explode(’ ’, get_the_title(), $length);
if (count($mytitle)>=$length) {
array_pop($mytitle);
$mytitle = implode(” „,$mytitle). $after;
} else {
$mytitle = implode(” „,$mytitle);
}
return $mytitle;
}
/* FEATURED THUMBNAILS */
if ( function_exists( 'add_theme_support’ ) ) { // Added in 2.9
add_theme_support(’post-thumbnails’);
add_image_size( 'custom_thumb’, 150, 150, true);
}
/* GET THUMBNAIL URL */
function get_image_url(){
$image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id,’large’);
$image_url = $image_url[0];
echo $image_url;
}
/* PAGE NAVIGATION */
function getpagenavi(){
?>
<div id=”tnavigation”>
<?php if(function_exists(’wp_pagenavi’)) : ?>
<?php wp_pagenavi() ?>
<?php else : ?>
<div class=”alignleft”><?php next_posts_link(__(’« Older Entries’,’arclite’)) ?></div>
<div class=”alignright”><?php previous_posts_link(__(’Newer Entries »’,’arclite’)) ?></div>
<div class=”clear”></div>
<?php endif; ?>
</div>
<?php
}
?>1