SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hep me with my wordpress blog

    The archived and categories I think not working correctly. When I click on the month of November, it shows only posts in full message. Also when I click on categories.

    I want summary of post, but I don't understand why this happens.

    Please help.

    Thanks

  2. #2
    SitePoint Wizard jimbo_dk's Avatar
    Join Date
    May 2005
    Location
    Singapore
    Posts
    1,261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you give a link to your blog? It would depend on what type of theme you are using.

    In order for the summary to show, have you typed something in the 'excerpt' box? or put a <!--more--> tag in your post?
    Winners Respond. Losers React.
    Singapore Web Designer

  3. #3
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jimbo_dk View Post
    Can you give a link to your blog? It would depend on what type of theme you are using.

    In order for the summary to show, have you typed something in the 'excerpt' box? or put a <!--more--> tag in your post?
    It's in my sig. http://www.myseoblog.net

    thanks

  4. #4
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice

  5. #5
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    You'll need to open archive.php located in your active themes folder and change the line that has the_content to the_excerpt.
    Code PHP:
    <?php the_content(); ?>
    <?php the_excerpt(); ?>
    Plus make sure to add an excerpt to each post as jimbo_dk said.

  6. #6
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Just as a note, if there is no excerpt, WP will automagically excerpt for you.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  7. #7
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot.. I will do this later..

  8. #8
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Johnny Gulag View Post
    Hello

    You'll need to open archive.php located in your active themes folder and change the line that has the_content to the_excerpt.
    Code PHP:
    <?php the_content(); ?>
    <?php the_excerpt(); ?>
    Plus make sure to add an excerpt to each post as jimbo_dk said.
    Hello John, here is the code of my archive.php. Please tell me what do I need to change here or where to insert the given codes.
    Code:
    <?php
    
    
    /*
    
    
    Template Name: Archives
    
    
    */
    
    
    ?>
    
    
    
    
    
    <?php get_header(); ?>
    
    
    
    
    
    <div id="content"><div class="cont-border-white"><div class="cont-border-grey">
    
    
    	<div id="main">
    
    
    		<div class="content">
    
    
    			<div class="post">
    
    
    				<div class="entry">
    
    
    					<h2>Archives by Month:</h2>
    
    
    					<ul>
    
    
    					 <?php wp_get_archives('type=monthly'); ?>
    
    
    					</ul>
    
    
    					
    
    
    					<h2>Archives by Subject:</h2>
    
    
    					<ul>
    
    
    					 <?php wp_list_categories(); ?>
    
    
    					</ul>
    
    
    				</div>
    
    
    			</div>
    
    
    		</div>
    
    
    	</div>
    
    
    		
    
    
    	<?php get_sidebar(); ?>
    
    
    
    
    
    	<div class="clear"></div>
    
    
    </div></div></div>
    
    
    
    
    
    <?php get_footer(); ?>
    How about my categories?

    Thank's a lot..

  9. #9
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    That is archive(s).php you need to edit archive.php no s. Then simply replace the line that says:
    Code PHP:
    <?php the_content(); ?>
    with this:
    Code PHP:
    <?php the_excerpt(); ?>
    Feel free to post the code from the archive.php file and I will make the change.

  10. #10
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is my code for archive.php

    Code:
    <?php get_header(); ?>
    
    
    
    
    
    <div id="content"><div class="cont-border-white"><div class="cont-border-grey">
    
    
    	<div id="main">
    
    
    		<div class="content">
    
    
    
    
    
    	<?php if (have_posts()) : ?>
    
    
    
    
    
    	<?php $post = $posts[0]; /* Hack. Set $post so that the_date() works.*/ ?>
    
    
    	<?php /* If this is a category archive */ if (is_category()) { ?>
    
    
    	<h2 class="pagetitle">Archive for the "<strong><?php single_cat_title(); ?></strong>" Category</h2>
    
    
    	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    
    
    	<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
    
    
    	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    
    
    	<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
    
    
    	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    
    
    	<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
    
    
    	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
    
    
    	<h2 class="pagetitle">Author Archive</h2>
    
    
    	<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    
    
    	<h2 class="pagetitle">Blog Archives</h2>
    
    
    	<?php } ?>
    
    
    
    
    
    		<?php while (have_posts()) : the_post(); ?>
    
    
    
    
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    
    
    				<div class="date"><?php the_time('j') ?><br /><?php the_time('M') ?></div>
    
    
    				<div class="title"><div class="bord-l"><div class="bord-r"><div class="tit-rb"><div class="tit-lb"><div class="tit-rt"><div class="tit-lt">
    
    
    					<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
    
    
    					<p class="author">Author: <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ' | '); ?></p>
    
    
    				</div></div></div></div></div></div></div>
    
    
    				<div class="entry">
    
    
    
    
    
    					<?php the_content('Read the rest of this entry »'); ?>
    
    
    
    
    
    				</div>
    
    
    				<div class="postmetadata">Filed Under »&nbsp;&nbsp;<?php the_category(', ') ?>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<span><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></span></div>
    
    
    			</div>
    
    
    
    
    
    		<?php endwhile; ?>
    
    
    
    
    
    				<div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
    
    
    
    
    
    		<?php else : ?>
    
    
    				<h2><?php _e('Not Found'); ?></h2>
    
    
    				<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    
    
    	<?php endif; ?>
    
    
    			
    
    
    		</div>
    
    
    	</div>
    
    
    		
    
    
    	<?php get_sidebar(); ?>
    
    
    
    
    
    	<div class="clear"></div>
    
    
    </div></div></div>
    
    
    
    
    
    <?php get_footer(); ?>

  11. #11
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Here you go.
    Code PHP:
    <?php get_header(); ?>
     
     
     
     
     
    <div id="content"><div class="cont-border-white"><div class="cont-border-grey">
     
     
    	<div id="main">
     
     
    		<div class="content">
     
     
     
     
     
    	<?php if (have_posts()) : ?>
     
     
     
     
     
    	<?php $post = $posts[0]; /* Hack. Set $post so that the_date() works.*/ ?>
     
     
    	<?php /* If this is a category archive */ if (is_category()) { ?>
     
     
    	<h2 class="pagetitle">Archive for the "<strong><?php single_cat_title(); ?></strong>" Category</h2>
     
     
    	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
     
     
    	<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
     
     
    	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
     
     
    	<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
     
     
    	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
     
     
    	<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
     
     
    	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
     
     
    	<h2 class="pagetitle">Author Archive</h2>
     
     
    	<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
     
     
    	<h2 class="pagetitle">Blog Archives</h2>
     
     
    	<?php } ?>
     
     
     
     
     
    		<?php while (have_posts()) : the_post(); ?>
     
     
     
     
     
    			<div class="post" id="post-<?php the_ID(); ?>">
     
     
    				<div class="date"><?php the_time('j') ?><br /><?php the_time('M') ?></div>
     
     
    				<div class="title"><div class="bord-l"><div class="bord-r"><div class="tit-rb"><div class="tit-lb"><div class="tit-rt"><div class="tit-lt">
     
     
    					<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
     
     
    					<p class="author">Author: <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ' | '); ?></p>
     
     
    				</div></div></div></div></div></div></div>
     
     
    				<div class="entry">
     
     
     
     
     
    					<?php the_excerpt(); ?>
     
     
     
     
     
    				</div>
     
     
    				<div class="postmetadata">Filed Under »&nbsp;&nbsp;<?php the_category(', ') ?>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<span><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></span></div>
     
     
    			</div>
     
     
     
     
     
    		<?php endwhile; ?>
     
     
     
     
     
    				<div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
     
     
     
     
     
    		<?php else : ?>
     
     
    				<h2><?php _e('Not Found'); ?></h2>
     
     
    				<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
     
     
    	<?php endif; ?>
     
     
     
     
     
    		</div>
     
     
    	</div>
     
     
     
     
     
    	<?php get_sidebar(); ?>
     
     
     
     
     
    	<div class="clear"></div>
     
     
    </div></div></div>
     
     
     
     
     
    <?php get_footer(); ?>
    WOW! There are lots of divisions in there.

  12. #12
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, it still shows 2 posts like before..just posts are shortened..
    http://www.myseoblog.net/2007/11/

    Doesn't even have the links for "continue reading" the posts..... seems something is wrong with the script?

    Thanks anyway

  13. #13
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Solidsnake View Post
    Oh, it still shows 2 posts like before..just posts are shortened..
    http://www.myseoblog.net/2007/11/

    Doesn't even have the links for "continue reading" the posts..... seems something is wrong with the script?

    Thanks anyway
    Nothing is wrong with the script. It does exactly what you asked. However that is easily fixed to make it do what you want it to.

    I'll be back in a sec with a new archive.php file for you.

  14. #14
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This ought to fix it. Although it will now appear as bla bla bla [...] continue reading rather than bla bla bla ... continue reading. I can't remember how to get rid of those []'s, but if you do some searching for how to format the_excerpt you should be able to find a fix for that. I have a sneaking suspicion that the_excerpt(' ... ') may do the trick, but I'm not 100&#37; certain and haven't tested it.

    Code:
    <?php get_header(); ?>
    <div id="content"><div class="cont-border-white"><div class="cont-border-grey">
        <div id="main">
            <div class="content">
        <?php if (have_posts()) : ?>
        <?php $post = $posts[0]; /* Hack. Set $post so that the_date() works.*/ ?>
        <?php /* If this is a category archive */ if (is_category()) { ?>
        <h2 class="pagetitle">Archive for the "<strong><?php single_cat_title(); ?></strong>" Category</h2>
        <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
        <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
        <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
        <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
        <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
        <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
        <?php /* If this is an author archive */ } elseif (is_author()) { ?>
        <h2 class="pagetitle">Author Archive</h2>
        <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
        <h2 class="pagetitle">Blog Archives</h2>
        <?php } ?>
            <?php while (have_posts()) : the_post(); ?>
                <div class="post" id="post-<?php the_ID(); ?>">
                    <div class="date"><?php the_time('j') ?><br /><?php the_time('M') ?></div>
                    <div class="title"><div class="bord-l"><div class="bord-r"><div class="tit-rb"><div class="tit-lb"><div class="tit-rt"><div class="tit-lt">
                        <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
                        <p class="author">Author: <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ' | '); ?></p>
                    </div></div></div></div></div></div></div>
                    <div class="entry">
                        <?php the_excerpt(); ?>
                        <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">continue reading</a>
                    </div>
                    <div class="postmetadata">Filed Under &#194;&#187;&nbsp;&nbsp;<?php the_category(', ') ?>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<span><?php comments_popup_link('No Comments &#194;&#187;', '1 Comment &#194;&#187;', '% Comments &#194;&#187;'); ?></span></div>
                </div>
            <?php endwhile; ?>
                    <div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
            <?php else : ?>
                    <h2><?php _e('Not Found'); ?></h2>
                    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
        <?php endif; ?>
            </div>
        </div>
        <?php get_sidebar(); ?>
        <div class="clear"></div>
    </div></div></div>
    <?php get_footer(); ?>
    PS: I removed the carriage returns from the code.

  15. #15
    Non-Member
    Join Date
    Oct 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you.. I will try this later when return..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •