Answers for "get post function wordpress"

PHP
0

get post by name wordpress

$posts = get_posts(array('name' => 'your-posts-name', 'post_type' => 'faq'));
Posted by: Guest on August-25-2021
0

the post function wordpress

if ( have_posts() ) {
    while ( have_posts() ) {
 
        the_post(); ?>
 
        <h2><?php the_title(); ?></h2>
 
        <?php the_content(); ?>
 
    <?php }
}
Posted by: Guest on August-17-2021

Browse Popular Code Answers by Language