В настоящее время у меня есть веб-сайт, отличный от Wordpress: asia-hr.com , и у меня также есть один поддомен, который является веб-сайтом Wordpress blog.asia-hr.com .
Сейчас я работаю над домашней страницей asia-hr.com и хочу добавить раздел для отображения 3 самых последних статей моего блога.
Что у меня есть:
<?php if (have_posts() ):?>
<?php while(have_posts()):the_post(); ?>
<div id="post">
<h2><a href="<?php the_permalink(); ?>"></a><?php the_title(); ?></h2>
<div class="byline">Escrito por <?php the_author_posts_link(); ?>
el <a href="<?php the_permalink(); ?>"><?php the_time('l F d, Y'); ?></a>
</div>
<?php the_content('Read More..'); ?>
<?php endwhile; ?>
<?php else: ?>
<p>No posts were found. Sorry!")</p>
<?php endif; ?>
Очевидно, я получаю сообщение об ошибке Call to undefined function have_posts()
, как я могу разрешить моей домашней странице доступ к моему блогу WP?