
shadowhck
Lambda
Programador
Verificado por Whatsapp
Pues no se que habrá fallado, ya que descuelga la web entera y tirra el siguiente error: Fatal error : Llamada a una función miembro have_posts () en un no-objeto en / home / todonlin / public_html / wp-content / themes / Edivos / index.php on line 1
Y en línea uno está " <?php get_header(); ?> " :S
Podéis verla.. u.u"
Perdon, ya vi el error, 😛. Tendre que reescribir parte del loop.
Aqui esta:
PHP:
<?php get_header(); ?>
<div id="slider">
<div class="topslider">
<div class="next">Sig</div>
<div class="prev">Ant</div>
<ul>
<?php $count = of_get_option('w2f_slide_number');
$slidecat = of_get_option('w2f_slide_categories');
$wp_query_1_args = array( 'posts_per_page' => $count, 'post_type' => 'video', 'genre' => $slidecat );
$wp_query_1 = new WP_Query($wp_query_1_args);
if ($wp_query_1->have_posts()) : while ($wp_query_1->have_posts()) : $wp_query_1->the_post(); ?>
<li>
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
$image = aq_resize( $img_url, 450, 280, true ); //resize & crop the image
?>
<?php if($image) : ?>
<a rel="nofollow" href="<?php the_permalink(); ?>"><img class="slide-image" src="<?php echo $image ?>"/></a>
<?php endif; ?>
<div class="slide-caption">
<h3><?php the_title(); ?></h3>
Lo mas visto
</div>
<?php endwhile; endif; ?>
</li>
</ul>
</div>
</div>
<div id="fullcontent">
<div id="topbar" class="clearfix">
<div class="leftinfo"> Últimos Vídeos</div>
</div>
<?php
//$temp = $wp_query;
//$wp_query= null;
$vcount = of_get_option('w2f_video_count');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$wp_query_2_args = array( 'posts_per_page' => $vcount, 'post_type' => 'video', 'paged' => $paged );
$wp_query_2 = new WP_Query($wp_query_2_args);
while ($wp_query_2->have_posts()) : $wp_query_2->the_post(); ?>
<div class="video-post" id="post-<?php the_ID(); ?>">
<div class="video-title">
<h2><a rel="nofollow" href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?> </a></h2>
</div>
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
$image = aq_resize( $img_url, 165, 110, true ); //resize & crop the image
?>
<?php if($image) : ?>
<a rel="nofollow" href="<?php the_permalink(); ?>"><img class="video-image" src="<?php echo $image ?>"/></a>
<?php endif; ?>
</div>
<!-- post end -->
<?php endwhile; ?>
<div class="clear"></div>
<?php getpagenavi(); ?>
<?php //$wp_query = null; $wp_query = $temp;?>
</div>
<?php get_footer();
Pruebalo. 😀
Última edición: