• antisciolist

    (@antisciolist)


    I want to select which posts to have on the listings in the right-hand side of my blog. There is the Customizable Post Listings by Scott Reilly but that does not do the trick. It just allows you to have the posts by most commented, most recent, etc. but it does not allow you personally to select which posts to show. Has any got suggestions?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Kafkaesqui

    (@kafkaesqui)

    One I’m fond of:
    https://guff.szub.net/get-a-post

    You’d have to set up a separate instance of the function for each post you want to display, and it’s all through templates, but it does offer the benefit of working with standard WordPress template tags.

    Thread Starter antisciolist

    (@antisciolist)

    How would you set up it up so it appears like the Customizable Post Listings — on the right-hand side of the blog. Would you have to mess around with the html or css?

    Kafkaesqui

    (@kafkaesqui)

    Well as I said: “You’d have to set up a separate instance of the function for each post you want to display, and it’s all through templates…”

    At the least you need to insert <?php get_a_post(POST#); ?> and any associated template tags into your template. As to where you need to add it, that depends on your setup: in 1.2 this is typically index.php; in 1.5 your theme may have a sidebar.php.

    As to messing with html/css, that’s really up to you, depending on how much (or how little) you want to design the layout of it.

    Thread Starter antisciolist

    (@antisciolist)

    Ok, cool, thanks. I placed the get post function where the customizable post listings function is so where it appears on the blog should be alright. I tried putting in a number of a post but that doesn’t work. I’ll try a few other things …

    Kafkaesqui

    (@kafkaesqui)

    “I tried putting in a number of a post but that doesn’t work.”

    You did place in one or more regular template tags once you called the plugin function, correct? Something like this:

    <?php get_a_post(10); ?>
    <?php the_title(); ?>
    <?php the_content(); ?>

    Should post the title and content for post #10.

    Thread Starter antisciolist

    (@antisciolist)

    Actually, I only want to post a link to the post ( just as with Customizable post listings plugin). I think that’s where we’re running into trouble. Your plugin does not seem able to do that.

    Kafkaesqui

    (@kafkaesqui)

    You mean like this?

    <?php get_a_post(10); ?>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

    Thread Starter antisciolist

    (@antisciolist)

    thanks kafkaesqui for your help…. but, it seems that plain old html does the trick. you just have an html link back to the permalink of the post and that should do the trick.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Selecting Post for Listings’ is closed to new replies.