0
아래는 아무것도 내 검색 결과에 표시되지 않습니다 이제 wordpress에서 검색 결과를 표시하는 방법?
get_header();
<p>You searched for " <?php echo esc_html(get_search_query(false)); ?> ". Here are the results:</p>
while (have_posts()) : the_post();
<h1>Search Results</h1>
<a href="<?php the_permalink()">
<h2><?php the_title(); ?></h2>
</a>
<p><?php the_excerpt(); ?></p>
<?php endwhile; ?>
<?php get_sidebar(); ?>
<?php get_footer();
search.php
의 내 코드입니다. 아무도 내가 틀렸다고 말할 수 있습니까? 마찬가지로 나는 검색을위한 코드를 작성하지 않았다. 그래서 문제가 있다면 검색을위한 코드를 작성하는 방법과 방법을 알려줍니다. 도와주세요
코드가 표시되지 않습니다. – Lectem
내가 포함 할 때 PHP를 열고 PHP 태그를 닫는 것을 고려해보십시오. 코드가 문제가 아닌 것 같습니다. –
링크 (a) 안에 h2가있을 수는 없지만 그 외에는 어떻게 쿼리가 어떻게 생깁니 까? (have_posts()는 false를 반환하는 prossible 임) – bestprogrammerintheworld