Foros del Web » Programando para Internet » Jquery »

Problema con slideshow post en jquery montado en wordpress

Estas en el tema de Problema con slideshow post en jquery montado en wordpress en el foro de Jquery en Foros del Web. Hola, el problema es que los links de los post se van siempre a la misma página, no linkean a las singles particulares, van los ...
  #1 (permalink)  
Antiguo 16/08/2012, 15:19
 
Fecha de Ingreso: julio-2009
Mensajes: 10
Antigüedad: 14 años, 8 meses
Puntos: 0
Problema con slideshow post en jquery montado en wordpress

Hola, el problema es que los links de los post se van siempre a la misma página, no linkean a las singles particulares, van los códigos:

JQUERY:

<!-- SLIDER -->

<script type="text/javascript">


function slideSwitch() {
var $active = $('#slideshow li.active');

if ( $active.length == 0 ) $active = $('#slideshow li:last');

// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next()
: $('#slideshow li:first');

// uncomment the 3 lines below to pull the images in random order

// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );


$active.addClass('last-active').animate({opacity: 0.0}, 1000 );

$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}

$(function() {
setInterval( "slideSwitch()", 5000 ); // ajuste de velocidad
});

</script>

<!-- SLIDER -->

HTML:
<div id="slideshow">
<?php query_posts('cat=1&showposts=3'); ?>
<?php
$resaltado = 'active';
if (have_posts()) : while (have_posts()) : the_post();
?>
<?php if ($resaltado): ?>

<li class="<?=
$resaltado;
$resaltado = null;
?>">

<?php
$image = null;
$attachments = & get_children(array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image'));
if ($attachments == TRUE) {
foreach ($attachments as $att) {
$image = wp_get_attachment_image_src($att->ID, 'full', false);
break;
}
}
if (isset($image)) {
?>

<img src="<?php echo $image[0]; ?>" width="600" />
<?php } ?>
<a href="<?php the_permalink(); ?>">
<span>
<h2><?php the_title(); ?></h2>
<small>Publicado el <?php the_time('l j, F, Y') ?></small>
</span>
</a>
</li>

<?php else : ?>

<li>
<?php
$image = null;
$attachments = & get_children(array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image'));
if ($attachments == TRUE) {
foreach ($attachments as $att) {
$image = wp_get_attachment_image_src($att->ID, 'full', false);
break;
}
}
if (isset($image)) {
?>

<img src="<?php echo $image[0]; ?>" />
<?php } ?>

<a href="<?php the_permalink(); ?>">
<span>
<h2><?php the_title(); ?></h2>
<small>Publicado el <?php the_time('l j, F, Y') ?></small>
</span>
</a>
</li>

<?php endif; ?>
<?php
endwhile;
endif;
wp_reset_query();
?>

</div>

CSS:
#slideshow {
border: 5px solid #CCCCCC;
float:left;
margin: 10px 0 20px;
height: 600px;
position:relative;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 4px 6px;
box-shadow: rgba(0, 0, 0, 0.5) 0 4px 6px;
width: 1125px;
z-index: 0;
}

#slideshow li {
opacity:0.0;
height: 600px;
width: 1125px;
margin: 0px;
padding: 0px;
list-style-type: none;
overflow: hidden;
top:0;
left:0;
z-index:5;
opacity:0.0;
position: absolute;
}

#slideshow li img {
height: 600px;
width: 1125px;
}

#slideshow li span {
display: block;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 10px;
position: absolute;
z-index: 10;
background-color: #000;
padding: 8px;
left: 0px;
right: 0px;
bottom: 0px;
filter: alpha(opacity=80);
-moz-opacity: 0.8;
-khtml-opacity: 0.8;
opacity: 0.8;
}

#slideshow li a span h2 {
font-family: 'Quando', serif;
font-size: 28px;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
margin: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
background-color: transparent;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
line-height: 30px;
}

#slideshow li a span small {
font-size: 10px;
color: #CCCCCC;
display: block;
margin: 0px;
padding: 0px;
}
#slideshow li.active {
opacity:1.0;
}

#slideshow li.last-active {
}

Última edición por axdiseno; 16/08/2012 a las 15:24

Etiquetas: post, slideshow, wordpress
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 21:11.