• Resolved Dani

    (@difluir)


    Hi!
    I want to show a specific post from custom post type “Slide Home”, but my code doesn’t work.

    <?php
    $loop = new WP_Query( array( 'post_type' => 'slide_home', 'p' => 231 ) );
    if (have_posts()) : while (have_posts()) : the_post();
    ?>
    <?php the_content("Read more ?"); ?>
    <?php endwhile; endif; ?>

    I tried to use the same way for query posts, calling the page id ‘231’.

    Can you help me?

    Ps: sorry my bad english.

Viewing 1 replies (of 1 total)
  • Thread Starter Dani

    (@difluir)

    Oh I got \o/

    <?php
    query_posts('post_type=slide_home&p=231');
    if (have_posts()) : while (have_posts()) : the_post();
    ?>
    <?php the_content("Read more &raquo;"); ?>
    <?php endwhile; endif; wp_reset_query(); ?>

    ??

Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type by Post ID’ is closed to new replies.