Support » Fixing WordPress » Excerpt doesnt work

  • Hey folks, I’d appreciate a little help:
    Im trying to use the excerpt and I’ve read the tutorials and the FAQ’s but it’s not working for me. What am I doing wrong?

    I wrote this line on the index, into the loop:
    <?php the_content(‘View project details…’); ?>

    I’ve read that when I create a New Post, I need to use the “more” quicktag to add the <!–more–> and create the excerpt. I’ve done it all but it’s not working. The post is showed fully.

    I’m using WordPress 2.1
    Any help? Thanks in advance!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You are mixing two techniques used to not display the whole post.
    1. Replace the_content with the_excerpt and it works automatically.
    2. For the code you have above – you MUST insret the “more” tag into your post while writing it… where you want to break the text.
    p.s. the two methods do NOT work together.

    yeah I know, I used the second method and I inserted the “more” tag. I’ve experimenting a little more and ‘more’ tag works perfectly in the main index but it doesnt work in a section I created used a template.php page. Should I use a plugin for that section? The ‘more’ tag only works in the main index?

    I don’t know what your ‘template.php’ thing is. Is it a Page template – as in Pages? Obviously, the “more” does NOT work on Pages, since Pages are never listed as the posts in a “multi-Page” view, so no need for it.

    Perhaps, you should describe in details what is your goal, what do you want to do and someone will tell you HOW to do it.

    see this plugin The_excert reloaded 😉

    it allows you to add many feature to your sumary like photos ! see my blog for an exemple

    I created a php file called Portfolio.php and I added this code at the beginning: <title>Portfolio</title><?php
    Template Name: Portfolio

    Then I copied the loop from the main index and now Im using this template with a Page called Portfolio. That’s where the ‘more’ tag doesnt work.

    Is there a way to make it work?

    1. You do NOT need the title tags!
    2. Read again what I said above:

    Obviously, the “more” does NOT work on Pages, since Pages are never listed as the posts in a “multi-Page” view, so no need for it.

    ok, so I wont be able to use excerpts in a page?

    Nor excerpts neither more. Not without hacking…
    Try to search:
    (and similar keywords)

    Sorry to bother you one more time, but I still have a question:

    I read u said in a thread: “Normally there is no ‘multi-Page’ display as in the case of ‘multi-post’ display (like category or monthly archives)” which I understand. But I have, as I explained, a page with a template file, and Im using the Loop on that page and Im calling multiple posts there. I mean, you will see ONE page, but a LOT of posts in there. Why the excerpt or the ‘more’ doesnt work there, like they do on the main index? I cannot understand that, its the same loop code 🙁

    Because WP “knows” that’s a Page and not a multi-post view.

    I wanted to do the same thing: list posts in a special page template.

    Solution found: add before the loop displaying your posts the following code to ask not to display what is after the more tag

    		global $more;
    		$more = false;


    vprat: THANK YOU so much! I love you! 😉

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Excerpt doesnt work’ is closed to new replies.