Problema busca painel
-
Olá, pessoal!
Estou com um problema dentro da busca de páginas no painel do WordPress.
Ao pesquisar por alguma página, ele fornece os resultados somente de posts.
Creio que pode ser algo que alterei no template do Search, mas que acabou modificando a busca dentro do painel. Como corrigir isso?
O código do template é o seguinte:
<div id="conteudo"> <div id="noticias"> <? get_query_var( 'paged' ); $custom_query_args = array('s' => $_REQUEST['s'],'posts_per_page' => 30); $custom_query_args['paged'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $custom_query = new WP_Query( $custom_query_args ); // Pagination fix $temp_query = $wp_query; $wp_query = NULL; $wp_query = $custom_query; // Output custom query loop if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?> <div id="post"> <div id="thumb"> <?php if(has_post_thumbnail()) {//the_post_thumbnail(null, 'full');?> <img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_image_path($post->ID); ?>&h=400&w=400&zc=1" alt="<?php the_title(); ?>"><?php } else {echo '';}?> <div id="data"><?php the_time('d'); ?> de <?php the_time('F'); ?> de <?php the_time('Y'); ?></div> </div> <div id="c"> <div id="data" style="display:block;position:static"><?php the_time('d'); ?> de <?php the_time('F'); ?> de <?php the_time('Y'); ?></div> <div id="titulo"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div> <div class="leia"> <a href="<?php the_permalink(); ?>" class="leia-mais">Leia mais</a> </div> </div> </div> <?php endwhile; endif; wp_reset_query(); echo '<div class="nav-mais-post">'; // Custom query loop pagination previous_posts_link( 'Voltar' ); next_posts_link( 'Próximos Posts', $custom_query->max_num_pages ); echo '</div>'; // Reset main query object $wp_query = NULL; $wp_query = $temp_query; ?> </div> </div> <div id="noticias-mobile"> <?php // Output custom query loop if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?> <div id="post"> <div id="thumb"><?php if(has_post_thumbnail()) {//the_post_thumbnail(null, 'full');?><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_image_path($post->ID); ?>&h=400&w=400&zc=1" alt="<?php the_title(); ?>"><?php } else {echo '';}?></div> <div id="c"> <div id="data"><?php the_time('d'); ?> de <?php the_time('F'); ?> de <?php the_time('Y'); ?></div> <div id="titulo"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div> <div id="resumo"><p><?php the_excerpt(); ?></p><a href="<?php the_permalink(); ?>" class="leia-mobile">Leia mais</a></div> </div> </div> <?php endwhile; endif; wp_reset_query(); echo '<div class="nav-mais-post">'; // Custom query loop pagination previous_posts_link( 'Voltar' ); next_posts_link( 'Próximos Posts', $custom_query->max_num_pages ); echo '</div>'; // Reset main query object $wp_query = NULL; $wp_query = $temp_query; ?> </div> </div> </div> <?php get_footer(); ?>
- O tópico ‘Problema busca painel’ está fechado a novas respostas.