- Home
- Categorie
- Coding e Sistemistica
- WordPress
- Thumbnails in wordpress, non funzionano
-
Thumbnails in wordpress, non funzionano
Ciao a tutti, ho installato un nuovo template sul mio sito, template per la funzione ed il controllo, tra le alte cose delle thumbnails. Però non mi compaiono. Ho provato a vedere il file functions.php ma compare solo questo codice per le thumbnails ```
// Add theme support for Featured Images
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
}E' corretto o manca qualcosa? Questo il mio function.php ``` <?php // Theme Settings Page require_once(TEMPLATEPATH . "/theme-settings.php"); // Theme Styles require_once(TEMPLATEPATH . "/theme-styles.php"); // Theme Widgets require_once(TEMPLATEPATH . "/theme-widgets.php"); // Load Custom Post Options for Write Post and Write Page require_once(TEMPLATEPATH . "/theme-metaboxes.php"); // Load Theme Javascript require_once(TEMPLATEPATH . "/theme-js.php"); // Register widgetized areas function theme_widgets_init() { register_sidebar(array ( 'name'=>'Sidebar-Wide - Top', 'id'=>'widget-1', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Sidebar-Wide - Bottom Left', 'id'=>'widget-2', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Sidebar-Wide - Bottom Right', 'id'=>'widget-3', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Sidebar-Narrow', 'id'=>'widget-4', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Footer Widget 1', 'id'=>'widget-5', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Footer Widget 2', 'id'=>'widget-6', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Footer Widget 3', 'id'=>'widget-7', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Footer Widget 4', 'id'=>'widget-8', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Alt Home Page Widget 1', 'id'=>'widget-9', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Alt Home Page Widget 2', 'id'=>'widget-10', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); register_sidebar(array ( 'name'=>'Alt Home Page Widget 3', 'id'=>'widget-11', 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>', )); } add_action( 'init', 'theme_widgets_init' ); // Get image path for WP Network sites function get_network_image_path ($img_src) { global $blog_id; if ( isset($blog_id) && $blog_id > 0 ) { $imageParts = explode('/files/', $img_src); if (isset($imageParts[1])) { $img_src = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1]; } } return $img_src; } // Add thickbox to single post pages that use thickbox class function solo_add_thickbox() { global $post; if ( is_singular() && strpos($post->post_content,'class="thickbox"') !== false ) { add_thickbox(); } } add_action('wp_print_styles','solo_add_thickbox'); // Add theme support for Featured Images if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } // Add Excerpt field to Pages add_post_type_support( 'page', 'excerpt' ); // Add RSS Feed Links add_theme_support( 'automatic-feed-links' ); // Add support for WP 3.0 Menu Management if (function_exists('add_theme_support')) { add_theme_support('menus'); } if (function_exists('register_nav_menus')) { function register_my_menus() { register_nav_menus(array( 'topnav' => __( 'Top Navigation' ), 'catnav' => __( 'Category Navigation' ), 'footernav' => __( 'Footer Navigation' ) ) ); } add_action( 'init', 'register_my_menus' ); } function nav_fallback() { ?> <?php wp_page_menu( array( 'show_home' => 'Home', 'sort_column' => 'menu_order' ) ); ?> <?php } function footnav_fallback() { ?> <ul><?php wp_list_pages( array( 'depth' => 1, 'title_li' => '', 'sort_column' => 'menu_order' ) ); ?></ul> <?php } function catnav_fallback() { ?> <ul class="clearfix"><?php wp_list_categories('title_li='); ?></ul> <?php } // Checks for active Page Template File function is_pagetemplate_active($pagetemplate = '') { global $wpdb; $sql = "select meta_key from $wpdb->postmeta where meta_key like '_wp_page_template' and meta_value like '" . $pagetemplate . "'"; $result = $wpdb->query($sql); if ($result) { return TRUE; } else { return FALSE; } } // Get custom field value. function get_custom_field($key, $echo = FALSE) { global $post; $custom_field = get_post_meta($post->ID, $key, true); if ($echo == FALSE) return $custom_field; echo $custom_field; } // Ready the theme for translation load_theme_textdomain("solostream"); // Add Twitter and other social media links to user profile add_filter('user_contactmethods','add_twitter_contactmethod',10,1); function add_twitter_contactmethod( $contactmethods ) { $contactmethods['twitter'] = 'Twitter Username'; $contactmethods['facebook'] = 'Facebook Username'; $contactmethods['googbuzz'] = 'Google Plus Username'; $contactmethods['linkedin'] = 'LinkedIn Username'; $contactmethods['flickr'] = 'Flickr Username'; $contactmethods['youtube'] = 'Youtube Username'; return $contactmethods; } // This function limits the number of words in the magazine home page excerpt. function string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words); } // This function lists pings/trackbacks. function list_pings($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> | <?php comment_date(); ?> <?php } // Add rel="nofollow" to the read more link. function add_nofollow_to_more_links($content) { return preg_replace("@class=\"more-link\"@", "class=\"more-link\" rel=\"nofollow\"", $content); } add_filter('the_content', 'add_nofollow_to_more_links'); // Remove the default border from gallery thumbnails. add_filter( 'gallery_style', 'remove_gallery_border' ); function remove_gallery_border( $galleryStyles ) { // Set the string we want to remove from the default style declaration. $remove = "border: 2px solid #cfcfcf;"; // Remove it. $galleryStyles = str_replace( $remove, '', $galleryStyles ); return $galleryStyles ; } ?> ```** **
-
Penso che non manchi nulla nel codice, ma non prendertela, il forum in questo caso è inflessibile.
Per i temi premium c'è il supporto del costruttore.
Comprati quel tema wp-clear che ora con lo sconto te lo vendono a circa 30 euro oppure dovrai arrangiarti da solo.
-
Ciao, grazie per la risposta. Ho pensato di chidere aiuto a voi in quanto, ho acquisato il template (come potrei sennò avere il codice?). Il loro forum però non da segni di vita..in senso di supporto.
Grazie mille lo stesso e buon fine settimana