Problem with excerpts


Author Message
Florian Robardet

Posted: 1/10/2009
Quote message 

:-P
Hello again,

I just bought Artisteer and generated my first theme. It looks great.

My problem is that when I set up Wordpress so that it shows only excerpts of articles on the main page, it shows full articles on the main page instead of just the excerpts.

How can the theme be changed so that excerpts are shown, and not the full article, on the main page (where it shows by defaul the last articles) ?

Thank you for your kind answer :-)
 
Dan

Posted: 1/10/2009
Quote message 

That's all controllable from within Wordpress. Try using the read more function.

Use this code in your post or page content:

<!--more-->


put the code above after say 1 paragraph, see if that works.
 
Florian Robardet

Posted: 1/10/2009
Quote message 

I just found that tip from http://codex.wordpress.org/FAQ_Layout_and_Design

I have tried it, the <!--more--> quicktag.

I am sorry to say that it does not work :-(
 
Dan

Posted: 1/10/2009
Quote message 

What version of wordpress are you using?
 
Florian Robardet

Posted: 1/10/2009
Quote message 

Ahem ... me again :-D

It works much better when I add the tag in "HTML" function.
Did not work in the WYSIWYG editor. Now it works much better.

Still, my plans are to put this Artisteer them on a Wordpress blog that is to be used by people that are not into HTML, themes and programming, that are not webmasters but people who just want to cut & paste articles.

I would prefer the excerpt function to work, instead than having them look into the HTML code and put this tag : they are not computer freaks and might feel lost or make mistakes.

Any update for the excerpt command to work would be great.
ACtually it seems that it is not in the theme but in the wp-includes/query.php file that it shows the full content of the post instead of just the excerpt...

The "more" quicktag is cool, anyway.
 
Florian Robardet

Posted: 1/10/2009
Quote message 

Quote Dan:

What version of wordpress are you using?


Latest so far, 2.7. Works now :-)

Even though I think this is not nice to tip into the HTML code for the people that will use the blog after I've set it up.
 
Florian Robardet

Posted: 1/10/2009
Quote message 

How cute :-D I managed to find the best way to do it.

Went into the Artisteer theme.
Edited index.php
Found the line where it says <div class="entry">

Changed the code with this :

        <div class="entry">          

<?php if(is_single()) {
the_content();
} else {
the_excerpt();
} ?>
</div>


The result is much much better ! It now works with the extracts (and these extracts can be different from the article).

Happy :-{}
 
Dan

Posted: 1/10/2009
Quote message 

ah but you shouldn't have to hack the core, that's not good.
 
Florian Robardet

Posted: 1/11/2009
Quote message 

Well, then, the Artisteer developer could use this improvement in the generated theme in the next update O:)

I think this code is clean ... It only checks if the post is single or if it comes from a list page.

The problem is that it is hard coded, it doesn't check the setting of the Wordpress blog, but I dunno yet how to do that. :-P
 
Hoodle

Posted: 3/10/2009
Quote message 

In the new beta version, this hack doesn't work :(

Anyone have any ideas how to make only the excerpts appear?
 
Marc Smith

Posted: 3/11/2009
Quote message 

Look for plug ins that give you control over posts and excerpts.

You should never hack away or make mods to the core code of Wordpress, just because it can affect so much more than just the area you are trying to fix.

That is why there is plug in technology., so you don't have to do anything to the code in the framework. Trying to debug issues after those changes are made is a nightmare.
 
Nim

Posted: 4/6/2009
Quote message 

I like your code fix. But my index.php doesn't have:

<div class="entry">


The only part with reference to the_content or the_excerpt is:

<div class="PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
</div>


Any idea how to edit that to make it behave?