Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » WordPress »

Las imagenes destacadas no se muestran en las categorías

Estas en el tema de Las imagenes destacadas no se muestran en las categorías en el foro de WordPress en Foros del Web. Buenas noches compañeros, He llegado aquí bastante desesperado, he buscado por muchos sitios, y las soluciones que he encontrado no funcionan para mi caso. Me ...
  #1 (permalink)  
Antiguo 17/03/2013, 16:55
 
Fecha de Ingreso: marzo-2013
Ubicación: En barcelona
Mensajes: 3
Antigüedad: 11 años, 1 mes
Puntos: 0
Las imagenes destacadas no se muestran en las categorías

Buenas noches compañeros,

He llegado aquí bastante desesperado, he buscado por muchos sitios, y las soluciones que he encontrado no funcionan para mi caso.

Me sucede lo siguiente:

Hago una entrada nueva en Wordpress, pongo imagen destacada y el texto de la entrada.

Cuando finalizo la misma y voy a la página principal, me sale el post con la imagen destacada, pero cuando voy a la categoría (cualquiera) me sale el titulo del post, pero la miniatura no me sale. Adjunto 2 fotografías para que me entendáis mejor.

Principal:
http://imageshack.us/photo/my-images/820/principalu.png/

Categorías:
http://imageshack.us/photo/my-images/26/categoriac.png/

Si queréis ver el código o lo queréis ver mas de cerca, la página web es www.todomods.com

Espero que podamos arreglar este problema juntos.

Gracias.
  #2 (permalink)  
Antiguo 17/03/2013, 23:33
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: Las imagenes destacadas no se muestran en las categorías

tienes que editar tu theme y agregar el siguiente código en la sección que necesitas aparezca

Código PHP:
Ver original
  1. <?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>

para mas información visita el codeplex de wordpress http://codex.wordpress.org/Function_...post_thumbnail
  #3 (permalink)  
Antiguo 18/03/2013, 04:30
 
Fecha de Ingreso: marzo-2013
Ubicación: En barcelona
Mensajes: 3
Antigüedad: 11 años, 1 mes
Puntos: 0
Respuesta: Las imagenes destacadas no se muestran en las categorías

Hola ArturoGallegos,

Esta opción ya la probe en el theme, y cuando añado esta linea en el archivo "category.php", me sale un error vinculado en la base de datos en el momento en que entro en categorias dentro de mi web.

¿Quizás no sea ahí donde lo tengo que insertar?

Gracias.
  #4 (permalink)  
Antiguo 18/03/2013, 04:32
 
Fecha de Ingreso: marzo-2013
Ubicación: En barcelona
Mensajes: 3
Antigüedad: 11 años, 1 mes
Puntos: 0
Respuesta: Las imagenes destacadas no se muestran en las categorías

En functions.php, hay esto:

Cita:
<?php
/**
* Theme functions used by Eclipse.
*
* Authors: Tyler Cunningham, Trent Lapinski
* Copyright: © 2012
* {@link http://cyberchimps.com/ CyberChimps LLC}
*
* Released under the terms of the GNU General Public License.
* You should have received a copy of the GNU General Public License,
* along with this software. In the main directory, see: /licensing/
* If not, see: {@link http://www.gnu.org/licenses/}.
*
* @package Eclipse.
* @since 1.0
*/


function eclipse_url_filtered($fields){
if(isset($fields['url']))
unset($fields['url']);

return $fields;
}
add_filter('comment_form_default_fields', 'eclipse_url_filtered');


/**
* Define global theme functions.
*/
$themename = 'eclipse';
$themenamefull = 'Eclipse';
$themeslug = 'ec';
$root = get_template_directory_uri();
$pagedocs = 'http://cyberchimps.com/question/using-the-eclipse-page-options/';
$sliderdocs = 'http://cyberchimps.com/question/using-the-eclipse-feature-slider/';

/**
* Basic theme setup.
*/
function eclipse_theme_setup() {
global $content_width;
if ( ! isset( $content_width ) ) $content_width = 720; //Set content width

add_theme_support(
'post-formats',
array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat')
);

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 720, 720, true );
add_theme_support('automatic-feed-links');
add_editor_style();
}
add_action( 'after_setup_theme', 'eclipse_theme_setup' );

/**
* Redirect user to theme options page after activation.
*/
if ( is_admin() && isset($_GET['activated'] ) && $pagenow =="themes.php" ) {
wp_redirect( 'themes.php?page=eclipse' );
}

/**
* Add link to theme options in Admin bar.
*/
function eclipse_admin_link() {
global $wp_admin_bar;

$wp_admin_bar->add_menu( array( 'id' => 'Eclipse', 'title' => 'Eclipse Options', 'href' => admin_url('themes.php?page=eclipse') ) );
}
add_action( 'admin_bar_menu', 'eclipse_admin_link', 113 );

/**
* Custom markup for gallery posts in main blog index.
*/
function eclipse_custom_gallery_post_format( $content ) {
global $options, $themeslug, $post;
$root = get_template_directory_uri();

ob_start();
if ( has_post_thumbnail() && $featured_images == '1' && !is_single()) {
echo '<div class="featured-image">';
echo '<a href="' . get_permalink($post->ID) . '" >';
the_post_thumbnail();
echo '</a>';
echo '</div>';
}
?>
<div class="row">
<div class="three columns"><?php response_post_byline(); ?></div>
<div class="entry nine columns">
<h2 class="posts_title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>

<?php if (!is_single()): ?>
<?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
?>

<figure class="gallery-thumb">
<a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
<br /><br />
This gallery contains <?php echo $total_images ; ?> images
<?php endif;?>
</figure><!-- .gallery-thumb -->
<?php endif;?>

<?php if (is_single()): ?>
<?php the_content(); ?>
<?php endif;?>

<!--Begin @Core link pages hook-->
<?php response_link_pages(); ?>
<!--End @Core link pages hook-->

<!--Begin @Core post edit link hook-->
<?php response_edit_link(); ?>
<!--End @Core post edit link hook-->
</div><!--end entry-->
</div><!--end row-->
<?php

$content = ob_get_clean();
return $content;
}
add_filter('response_post_formats_gallery_content' , 'eclipse_custom_gallery_post_format' );

/**
* Set custom post excerpt link text based on theme option.
*/
function eclipse_new_excerpt_more($more) {

global $themename, $themeslug, $options, $custom_excerpt, $post, $root;

if ($options->get($themeslug.'_excerpt_link_text') == '') {
$linktext = 'Continue Reading';
}

elseif ($custom_excerpt == 'recent') {
$linktext = 'Continue Reading';
}
else {
$linktext = $options->get($themeslug.'_excerpt_link_text');
}

return '&hellip;<div class="more-link"><br /><br /> <span class="continue-arrow"><img src="'.$root.'/images/continue.png"></span><a href="'. get_permalink($post->ID) . '"> '.$linktext.'</a></div>';
}
add_filter('excerpt_more', 'eclipse_new_excerpt_more');

/**
* Set custom post excerpt length based on theme option.
*/
function eclipse_new_excerpt_length($length) {

global $themename, $themeslug, $custom_excerpt, $options;

if ($options->get($themeslug.'_excerpt_length') == '') {
$length = '55';
}

elseif ($custom_excerpt == 'recent') {
$length = '15';
}
else {
$length = $options->get($themeslug.'_excerpt_length');
}

return $length;
}
add_filter('excerpt_length', 'eclipse_new_excerpt_length');

/**
* Attach CSS3PIE behavior to elements
*/
function eclipse_render_ie_pie() { ?>

<style type="text/css" media="screen">
#wrapper input, textarea, #twitterbar, input[type=submit], input[type=reset], #imenu, .searchform, .post_container, .postformats, .postbar, .post-edit-link, .widget-container, .widget-title, .footer-widget-title, .comments_container, ol.commentlist li.even, ol.commentlist li.odd, .slider_nav, ul.metabox-tabs li, .tab-content, .list_item, .section-info, #of_container #header, .menu ul li a, .submit input, #of_container textarea, #of_container input, #of_container select, #of_container .screenshot img, #of_container .of_admin_bar, #of_container .subsection > h3, .subsection, #of_container #content .outersection .section, #carousel_list, #calloutwrap, #calloutbutton, .box1, .box2, .box3, .es-carousel-wrapper

{
behavior: url('<?php echo get_template_directory_uri(); ?>/core/library/pie/PIE.htc');
}
</style>
<?php
}

add_action('wp_head', 'eclipse_render_ie_pie', 8);


/**
* Google Analytics.
*/
function eclipse_google_analytics() {
global $themename, $themeslug, $options;

echo stripslashes ($options->get($themeslug.'_ga_code'));

}
add_action('wp_head', 'eclipse_google_analytics');

function eclipse_lazy_load() {
global $root;
$placeholder = "$root/images/grey.gif";
echo <<<EOF
<script type="text/javascript">
jQuery(document).ready(function($){
jQuery("img").not("#orbitDemo img, .es-carousel img, #credit img").lazyload({
effect:"fadeIn",
placeholder: "$placeholder"
});
});
</script>
EOF;
}
add_action('wp_head', 'eclipse_lazy_load');

/**
* Register custom menus for header, footer.
*/
function eclipse_register_menus() {
register_nav_menus(
array( 'header-menu' => __( 'Header Menu' ))
);
}
add_action( 'init', 'eclipse_register_menus' );

/**
* Menu fallback if custom menu not used.
*/
function eclipse_menu_fallback() {
global $post; ?>

<ul id="nav_menu">
<?php wp_list_pages( 'title_li=&sort_column=menu_order&depth=3'); ?>
</ul><?php
}
/**
* Register widgets.
*/
function eclipse_widgets_init() {
register_sidebar(array(
'name' => 'Full Sidebar',
'id' => 'sidebar-widgets',
'description' => 'These are widgets for the sidebar.',
'before_widget' => '<div id="%1$s" class="widget-container">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
));
register_sidebar(array(
'name' => 'Left Half Sidebar',
'id' => 'sidebar-left',
'description' => 'These are widgets for the left sidebar.',
'before_widget' => '<div id="%1$s" class="widget-container">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
));
register_sidebar(array(
'name' => 'Right Half Sidebar',
'id' => 'sidebar-right',
'description' => 'These are widgets for the right sidebar.',
'before_widget' => '<div id="%1$s" class="widget-container">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
));

register_sidebar(array(
'name' => 'Footer',
'id' => 'footer-widgets',
'description' => 'These are the footer widgets',
'before_widget' => '<div class="three columns footer-widgets">',
'after_widget' => '</div>',
'before_title' => '<h3 class="footer-widget-title">',
'after_title' => '</h3>',
));
}
add_action ('widgets_init', 'eclipse_widgets_init');

/**
* Initialize response Core Framework and Pro Extension.
*/
require_once ( get_template_directory() . '/core/core-init.php' );

/**
* Call additional files required by theme.
*/
require_once ( get_template_directory() . '/includes/classy-options-init.php' ); // Theme options markup.
require_once ( get_template_directory() . '/includes/options-functions.php' ); // Custom functions based on theme options.
require_once ( get_template_directory() . '/includes/meta-box.php' ); // Meta options markup.
require_once ( get_template_directory() . '/includes/presstrends.php' ); // Meta options markup.


?>
  #5 (permalink)  
Antiguo 18/03/2013, 11:24
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: Las imagenes destacadas no se muestran en las categorías

Amigo lamento decirle que aquí se detiene toda la ayuda, pase a leer este post para entender el porque
http://www.forosdelweb.com/f118/no-d...s-pago-798431/

Le recomiendo acuda al soporte que brinda el creador del theme

Etiquetas: imagenes, muestran, página, post
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:26.