WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Interesting Issue (not sure it's an error) (6 posts)

  1. pufftenticle
    Member
    Posted 7 years ago #

    Hi !

    I was looking for a way to have a few posts on the front page with the Title, a blurb, then a read more, and then after those 3 or 4 posts a list of posts that are just the titles of previous posts (which are links to the post itself). I searched through the forums here and found a great suggestion that worked like a champ. However, after I placed it in there and finished smiling at myself, I noticed that all of the archived posts and selected categories no longer show the short excerpts, but the entire post in order with a 'next page' link at the bottom. I would rather it was the old way. Any suggestions ? Below is the code that I placed into the loop along with the entire rest of the loop.

    <?php query_posts('posts_per_page=4'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <?php edit_post_link('<img src="'.get_bloginfo(template_directory).'/images/pencil.png" alt="Edit Link" />','<span class="editlink">','</span>'); ?></h2>

    <p><?php the_content('Read the rest of this entry &raquo;'); ?></p>

    <div class="small box">
    Region: <?php the_category(', ') ?> | <span class="commentslink"><?php comments_popup_link('Comment', '1 Comment', '% Comments'); ?> | <?php if(function_exists('the_views')) { the_views('Views'); } ?> | <?php if(function_exists('wp_email')) { email_link('Share'); } ?> | <?php if(function_exists('wp_print')) { print_link('Print'); } ?>
    </span></div><br/>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php endwhile; ?>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
    <?php endif; ?>

    and here is the site for reference....

  2. pufftenticle
    Member
    Posted 7 years ago #

    i've searched thru the forums looking for an answer. searched under excerpts, etc. still no luck. any suggestions ?

  3. whooami
    Member
    Posted 7 years ago #

    without actually seeing..

    You have to realize that changes made to index.php are going to affect the display of category pages and archives UNLESS you use another template file to control their display.

    for instance:

    http://codex.wordpress.org/Category_Templates

    category.php, once created, will control that display

    archive.php, once created, will control another page display.

    so on ..

    In their absence, WP looks to index.php for how things ought to look

    You either need to create and use those files, or include some sort of switch within index.php so that it understands what the browser is looking at.

  4. pufftenticle
    Member
    Posted 7 years ago #

    cool. thanks for the advice. i looked all thru that codex page about the excerpt and category templates. i did create a category template, and that is working out well. i now understand why to do that; gave me much more control over the look of it. But; (smile) still it is showing the whole post and not just the excerpt.

    i went back to my index page and took that code mentioned above off; didn't help.

    i went into a different site that i have that does the categories like i want, copied the page over - still doesn't work.

    i think in all this shucking and jiveing i've done that i just 'overcoded' something, if that makes sense. i don't know what else to do since i have started from scratch and followed the codex 3 times and still it doesn't work. any other direction ?

  5. whooami
    Member
    Posted 7 years ago #

    welp, for starters, are you using wp-cache or ANY cache? If you are, you'll want to clear that to make sure youre not still seeing cached pages.

    The "system" works, I know this because I have a completely different index.php than my cats and archives, and my search page is different from those others.

    I'll tell you what, if you have archived copies of the files and are willing to send them off to me, I will mess around with them this weekend (my weekends start on Friday mornings).

    But its really not that hard, and I am sure you could manage yourself... so it's up to you.

    if you like, follow my profile and email the files to any user name at my domain (i use a catch-all email thing) and just give me a better idea of what youre trying to do.

    Good luck either way :)

  6. pufftenticle
    Member
    Posted 7 years ago #

    rock on. i will give that a shot. thanx amillions....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags