• I can’t believe I haven’t been able to find the answer for this as it seems like it must be common:

    I need to display specific posts (not in order by date) on a page of my wp site. The posts will show Title, Thumbnail and Excerpt.

    So I need to be able to pick which posts these are from the admin (not hardcode into the file) – my client will be picking these at will so I won’t know the id upfront.

    Please tell me I am missing a really obvious solution!

Viewing 8 replies - 1 through 8 (of 8 total)
  • I am the developer of the plugin called Custom Post Type List Shortcode. You can find it here CPT List

    It support everything you just stated. You can then make a category that you can assign all the posts you want to show on your pages or post and then use the shortcode on the page itself.

    You can view the youtube video about how to use it HERE

    Very simple. I respond all the time on our blog so if you have any questions feel free to visit.

    Blackbird Interactive’s Blog

    Thread Starter kellyrnh

    (@kellyrnh)

    Thanks so much for replying. I don’t know if that does what I’m looking for. My client just wants to pull a specific post, not by categories, etc, a very specific one (i.e. id 312). Looking at your video and plugin, I can’t tell if this does that?

    Hello,

    Try using this code where you want the specific post:

    <?php
    $post_id = 73;
    $queried_post = get_post($post_id);
    ?>
    <p><?php echo $queried_post->post_content; ?></p>
    <?php echo $queried_post->post_title; ?>

    Change the $post_id number to your specific post.

    Thread Starter kellyrnh

    (@kellyrnh)

    Thanks,

    but this needs to be coded into the php, right? I need my client to be able to change the post id at will in the admin panel. Ideas on how to do that?

    Yes, this is coded in the index.php or wherever you want your specific post.

    Your client just has to change that $post_id number to the article he wants, so you just tell him where the line is and he edits it everytime he likes, through the admin panel theme editor.

    Don’t know any other way to do this, but I’m sure there are plugins available for that like the one justingreerbbi posted.

    Why not use custom fields instead?

    Thread Starter kellyrnh

    (@kellyrnh)

    Hi esmi,

    I haven’t used custom fields a lot…how would this work?

    Thanks!

    Have a look at the link I posted above. You might also want to read up on WP_Query .

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display specific posts on pages?’ is closed to new replies.