Ayuda con código de destacados en WordPress

  • Autor Autor sebasxnco
  • Fecha de inicio Fecha de inicio
S

sebasxnco

Épsilon
hola forobeta alguien me ayuda con este codigo

PHP:
<?php $highlight1 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_1')."&showposts=1"); while($highlight1->have_posts()) : $highlight1->the_post();?>

para hacerlo de nuevo pero sin esa funciones highlight1
 
highlight1 es una variable dinamica de alguna de las miles de sentencias, habria que ver y revisar todo el codigo para ver a que hace referencia esa variable. Me suena a que es codigo de algun theme nulled o premium
en todo caso enviame un PM con mas informacion para ver si puedo ayudarte
 
Ese código hace un loop con la entrada mas reciente de las que tienen una categoría que tu defines previamente en tu tema y una imagen thumbnail. Asi que si quieres borrarlo, borra también todo lo que sigue de ese loop y que supongo yo muestra una entrada destacada.
 
como dice el compañero maxxim la variable highlight1 es de un tema premium que tengo hace tiempo y me encontré que la sección de destacados me servia para un tema que estoy haciendo

como puede hacer para quitarle esa varibles o hacer de nuevo el codigo para mostrar los destacados como

Enlace eliminado ALT1040
Enlace eliminado Lifehacker, tips and downloads for getting things done
Enlace eliminado LagZero.NET Análisis, Fotos y Videos

el codigo mas o menos es este

PHP:
<!-- Destacados // -->
		<span class="heading2"><span></span>
        
        </span>
		<ul class="highlights">
		<?php $highlight1 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_1')."&showposts=1"); while($highlight1->have_posts()) : $highlight1->the_post();?>
			<li>
			<?php if(get_post_meta($post->ID, "Image", true)) : ?>
				<a href="<?php the_permalink(); ?>" class="image"><img src="<?php echo get_post_meta($post->ID, "Image", true); ?>" /></a>
			<?php endif; ?>
				<span class="titledes"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
			</li>
		<?php endwhile; ?>

		<?php $highlight2 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_2')."&showposts=1"); while($highlight2->have_posts()) : $highlight2->the_post();?>
			<li>
			<?php if(get_post_meta($post->ID, "Image", true)) : ?>
				<a href="<?php the_permalink(); ?>" class="image"><img src="<?php echo get_post_meta($post->ID, "Image", true); ?>" /></a>
			<?php endif; ?>
				<span class="titledes"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
			</li>
		<?php endwhile; ?>

		<?php $highlight3 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_3')."&showposts=1"); while($highlight3->have_posts()) : $highlight3->the_post();?>
			<li>
			<?php if(get_post_meta($post->ID, "Image", true)) : ?>
				<a href="<?php the_permalink(); ?>" class="image"><img src="<?php echo get_post_meta($post->ID, "Image", true); ?>" /></a>
			<?php endif; ?>
				<span class="titledes"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
			</li>
		<?php endwhile; ?>
        
        		<?php $highlight4 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_4')."&showposts=1"); while($highlight3->have_posts()) : $highlight4->the_post();?>
			<li>
			<?php if(get_post_meta($post->ID, "Image", true)) : ?>
				<a href="<?php the_permalink(); ?>" class="image"><img src="<?php echo get_post_meta($post->ID, "Image", true); ?>" /></a>
			<?php endif; ?>
				<span class="titledes"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
			</li>
		<?php endwhile; ?>

		</ul>
		<div class="cleardes"></div>
		<!-- // Destacados -->

alguna ayuda
 
Atrás
Arriba