Support » Fixing WordPress » Just want one post to show on the index.php w/o affecting your search.

  • Resolved dannybcastillo

    (@dannybcastillo)


    I want just wanted to limit my index to one post at any given time.

    First, I thought I could change the settings in the admin bar: opitions»reading» “Show at Most” 1 post. What I didn’t realize was this fixed my search to only showing one post.

    Second try. I found this plugin that said it could fix the problem. I think it was the users fault on this one. I simply didn’t understand how use the plugin after installing and setting the conditions. Here’s the location of the plugin…
    http://mattread.com/archives/2005/03/custom-query-string-plugin/
    … maybe it might help you in your search for your answer.

    Third times a charm. What a idiot I am. I know, I am new to php, but I would like to think that I can almost read anything any understand it. I read thread after thread on this topic of “limit the number of post on the index.” Most seemed to older than my membership shelp tag. Then I found a link to THE LOOP page by codex.
    http://codex.wordpress.org/The_Loop
    There it was…
    <?php query_posts(‘category_name=special_cat&showposts=10’); ?>

    Just alter it to…
    <?php query_posts(‘showposts=1’); ?>
    and insert after your
    <?php get_header(); ?>
    in your index.php

    Hope this works for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you have the plugin installed – you shouldn’t touch any of the template files.

    Just read the Options for the plugin and use common sense 🙂
    a) select a conditional, e.g. “is_home”
    b) select the # of post to be shown
    c) click “Add”
    then go to the next one…

    Thread Starter dannybcastillo

    (@dannybcastillo)

    Hey, thanks for the common sense. I will try to use the plugin again. Maybe, this time it will work for me. What would the WP community do without you?

    Thread Starter dannybcastillo

    (@dannybcastillo)

    Thanks again, I got it to work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Just want one post to show on the index.php w/o affecting your search.’ is closed to new replies.