excerpt stuff?
-
Is there a way I can make a post on the front page display an excerpt if I enter one but not if I don’t and not limit the post to 55 characters. also I’d like a read more image to show on a post with an excerpt. I know about the <!–more–> tag and it doesn’t do exactly what I want.
Edit: and yes I have looked at codex 🙂
-
Maybe you need some excerpt related plugin(s). Take a look and search the Extend > Plugins section.
looked already I don’t see any that will do what I want
This one always worked for me:
http://guff.szub.net/2005/02/26/the_excerpt-reloaded/nope I don’t even get what its suppose to do all I want is for a summary to be on the front page for long posts and a read on link. I don’t want to use the “more” tag because it shows your teaser / summary in the actual post but the excerpt doesn’t
in fact it just broke my blog and made me have to remove it nice plugin >:(
the excerpt question i can’t answer. but the read more image:
<a href="<php the_permalink()?>" ><img src="path of your read more image file"/></a>I know how to do that, sigh I created this
<?php if (!empty($post->post_excerpt)) {the_excerpt(); } else { the_content(); } ?>
statement but it doesn’t work it gives me this error
Parse error: syntax error, unexpected T_STRING in domains/alexrogahn.com/html/wp-content/themes/AlexRogahnTheme/index.php on line 25managed to make it work
<?php if(!empty($post->post_excerpt)) { the_excerpt(); } else { the_content(); } ?>but I only want the read on link when it displays the excerpt once I have that I’m all finished ^.^
Then use the code given to you by mks6804 after the_excerpt
nope it doesn’t show up, hmmm this is what I’ve got
<?php if(!empty($post->post_excerpt)) { the_excerpt('<a href="<?php get_permalink() ?>">TEST</a>'); } else { the_content(); } ?>It won’t work am I doing something wrong?
Yes. It is not a parameter of the_excerpt. It should be AFTER the template tag.
I tried it like this first:
<?php if(!empty($post->post_excerpt)) { the_excerpt(); <a href="<?php get_permalink() ?>">TEST</a> } else { the_content(); } ?>it gave me this error
Parse error: syntax error, unexpected '<' in /domains/alexrogahn.com/html/wp-content/themes/AlexRogahnTheme/index.php on line 26then I tried it like this
<?php if(!empty($post->post_excerpt)) { the_excerpt()<a href="<?php get_permalink() ?>">TEST</a>; } else { the_content(); } ?>and It gave me this:
Parse error: syntax error, unexpected T_STRING in /domains/alexrogahn.com/html/wp-content/themes/AlexRogahnTheme/index.php on line 26a little help plz?
Because you need to close the PHP before starting HTML code or need to echo.
I am not a coder, so never trust the code I write:<?php if(!empty($post->post_excerpt)) { the_excerpt(); echo "<a href="<?php get_permalink() ?>">TEST</a>"; } else { the_content(); } ?>(or something like this)
On the other hand, with a little bit of search you could have find this, too:
http://www.cameraontheroad.com/?p=732Fixed:
<?php if(!empty($post->post_excerpt)) { the_excerpt(); ?> <a href="<?php get_permalink() ?>">TEST</a> <?php } else { the_content(); } ?>lol thanks, but this is the code that did what I wanted without any errors or loss of function
<?php if(!empty($post->post_excerpt)) { the_excerpt(); echo '<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?>Read the rest of this article »</a>'; } else { the_content(); echo '<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?>Goto Post Page »</a>'; } ?>hope this helps anyone wanting the same as me to 🙂
The topic ‘excerpt stuff?’ is closed to new replies.