WordPress.org

Forums

[resolved] Does this plugin exist? Haven't found it yet... (16 posts)

  1. pbrainz
    Member
    Posted 10 years ago #

    Hey folks,

    I've been searching for hours and hours and have yet to see if a certain type of plugin exists. Maybe I'm complicating things but I'll explain it anyways.

    I'm setting up a blog for a friend... who isn't exactly skilled when it comes to technological things. Anyways instead of using the <!--more--> button which is in the editor... is there anyway to setup wordpress so it will automatically add the more tag after x characters or x words (essentially auto creating a blurb)? I know it sounds stupid but if something like that existed it would make my life a hell of a lot easier.

  2. pbrainz
    Member
    Posted 10 years ago #

    Also wondered if 2 more plugins existed:

    The best photoblogging plugin I found was photopress... any others that I should be using instead?

    Is it possible to modify the index of a site so in a 3 panel site the middle panel will display the latest posts from category x, and on the 3rd panel it will show the latest posts from category y,z, etc?

  3. pbrainz
    Member
    Posted 10 years ago #

    bump...

  4. Michael Bishop

    Posted 10 years ago #

    To your first post:
    http://guff.szub.net/the-excerpt-reloaded/
    The second half of your 2nd post:
    The_Loop
    Conditional_Tags

    Might I add if those two links are not sufficient in pointing you in the right direction, check back, and we can get more specific.

  5. pbrainz
    Member
    Posted 10 years ago #

    ok so here is my code for the loop:

    <div id="content">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="post">
    <?php require('post.php'); ?>
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link() ?>
    </div>

    I want only posts to show up whose category id is 2.
    I read from the codex that I need to add certain bits of code... but no matter what I try it doesn't work. Where should I put in the bits of code?

  6. Michael Bishop

    Posted 10 years ago #

    Sorry, did think about this, Template_Tags/query_post

    simply add before your loop
    <?php query_posts('cat=2'); ?>

  7. debwire
    Member
    Posted 10 years ago #

  8. pbrainz
    Member
    Posted 10 years ago #

    it isn't working... what am I overlooking?

    <div id="content">
    <?php query_posts('cat=2'); ?>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="post">
    <?php require('post.php'); ?>
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link() ?>
    </div>

  9. pbrainz
    Member
    Posted 10 years ago #

    Evermore worked perfectly -- thanks. :)

  10. Kafkaesqui

    Posted 10 years ago #

    pbrainz, query_posts() does not work on the if ($posts) etc. version of The Loop (which is pre-1.5, and not query_posts aware). Instead modify it to this:

    <div id="content">
    <?php query_posts('cat=2'); ?>
    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    <div class="post">
    <?php require('post.php'); ?>
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link() ?>
    </div>

  11. Michael Bishop

    Posted 10 years ago #

    Thanks for pointing that out Kaf, I simply skimmed over the actual code. That's what I get for assuming everyone's using 1.5...

  12. Kafkaesqui

    Posted 10 years ago #

    Well, pbrainz has to be. Besides the issue of themes, query_posts() would have caused an undefined function error, and not just failed to work.

    However, the developer in this case did not with The Loop code...

  13. Michael Bishop

    Posted 10 years ago #

    I see. Sorta odd. Would there be a reason someone would use older code in a theme?

  14. Kafkaesqui

    Posted 10 years ago #

    • Conversion from older template
    • Not fully understanding the difference
    • Personal choice

    I'm sure there are others.

  15. pbrainz
    Member
    Posted 10 years ago #

    Kafkaesque!!! It works!! OMG I LOVE YOU! I love you as much as I love Kafka... and coincidentally I'm in love with him...

    Kafkaesqui, do you have any chat progs? I have a few other minor questions not worthy of this board...

  16. pbrainz
    Member
    Posted 10 years ago #

    Ok thanks everyone! It's all good.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags