← WordPress

Conflito Thumbnails

Lida 1646 vezes

Offline

João Godinho 
Membro
Mensagens 1755 Gostos 2
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Este é um problema complicado e difícil de explicar.

Estou a usar o tema Manganescent, estou também a integrar o WP Nivo Slider no tema, mas as thumbanails no nivo slider ficam sempre pequenas.

O tema tinha no ficheiro functions.php uma funções para as thumbnails serem geradas pelo plugin Regenerate Thumbnails.

functions.php
Código: (php) [Seleccione]
<?php

define
('PADD_THEME_NAME','Manganescent');
define('PADD_THEME_VERS','1.0');
define('PADD_THEME_SLUG','manganescent');
define('PADD_NAME_SPACE','padd');
define('PADD_GALL_THUMB_W',400);
define('PADD_GALL_THUMB_H',260);
define('PADD_LIST_THUMB_W',140);
define('PADD_LIST_THUMB_H',140);
define('PADD_YTUBE_W',255);
define('PADD_YTUBE_H',180);
define('PADD_THEME_FWVER','2.6.1');

define('PADD_THEME_PATH',get_theme_root() . DIRECTORY_SEPARATOR PADD_THEME_SLUG);
define('PADD_FUNCT_PATH',PADD_THEME_PATH DIRECTORY_SEPARATOR 'includes' DIRECTORY_SEPARATOR);

remove_action('wp_head','wp_generator');

add_theme_support('post-thumbnails');
add_theme_support('automatic-feed-links');

register_nav_menus(array('main' => 'Main Menu'));

set_post_thumbnail_size(PADD_LIST_THUMB_W,PADD_LIST_THUMB_H,true);
add_image_size(PADD_THEME_SLUG '-thumbnail',PADD_LIST_THUMB_W,PADD_LIST_THUMB_H,true);
add_image_size(PADD_THEME_SLUG '-gallery',PADD_GALL_THUMB_W,PADD_GALL_THUMB_H,true);

function 
padd_widgets_init() {
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '<div id="%1$s" class="box %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<div class="title"><h3>',
'after_title' => '</h3></div><div class="interior">',
));
register_sidebar(array(
'name' => 'Footer 1',
'before_widget' => '<div id="%1$s" class="box %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<div class="title"><h3>',
'after_title' => '</h3></div><div class="interior">',
));
register_sidebar(array(
'name' => 'Footer 2',
'before_widget' => '<div id="%1$s" class="box %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<h3>',
'before_title' => '<div class="title"><h3>',
'after_title' => '</h3></div><div class="interior">',
));
register_sidebar(array(
'name' => 'Footer 3',
'before_widget' => '<div id="%1$s" class="box %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<h3>',
'before_title' => '<div class="title"><h3>',
'after_title' => '</h3></div><div class="interior">',
));
register_sidebar(array(
'name' => 'Footer 4',
'before_widget' => '<div id="%1$s" class="box %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<h3>',
'before_title' => '<div class="title"><h3>',
'after_title' => '</h3></div><div class="interior">',
));
}
add_action('widgets_init','padd_widgets_init');

require 
PADD_FUNCT_PATH 'library.php';
require 
PADD_FUNCT_PATH 'hooks.php';

require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'socialnetwork.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'socialbookmark.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'advertisement.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'widgets.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'twitter.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'pagination.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'walker.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'input' DIRECTORY_SEPARATOR 'input-option.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'input' DIRECTORY_SEPARATOR 'input-socialnetwork.php';
require 
PADD_FUNCT_PATH 'classes' DIRECTORY_SEPARATOR 'input' DIRECTORY_SEPARATOR 'input-advertisement.php';

require 
PADD_FUNCT_PATH 'defaults.php';

require 
PADD_FUNCT_PATH 'administration' DIRECTORY_SEPARATOR 'options-functions.php';
require 
PADD_FUNCT_PATH 'administration' DIRECTORY_SEPARATOR 'posting-functions.php';

require 
PADD_FUNCT_PATH 'launch.php';

Já removi algumas coisas, mas deixo aqui o original.
Offline

João Godinho 
Membro
Mensagens 1755 Gostos 2
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Decidi pegar noutro tema e estou com um pequeno problema:
Código: (php) [Seleccione]
<div id="slider">
<?php 
$category get_option('wpns_category');
$n_slices get_option('wpns_slices');
?>

<?php query_posts'cat='.$category.'&posts_per_page=$n_slices' ); if( have_posts() ) : while( have_posts() ) : the_post(); ?>
<?php if(has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail(); ?>
</a>
<?php endif ?>
<?php endwhile; endif;?>
<?php wp_reset_query();?>
</div>

Como posso meter timthumb na imagem do slide?
Offline

João Godinho 
Membro
Mensagens 1755 Gostos 2
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Desculpem tantos posts. Problema resolvido!