• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

Wordpress Excerpt

Hi,

I have modified the loop file for a clients website that i created, but for some reason on some posts i get multiple excerpt more links and on others they appear fine. Not sure whats going on. I have attached my function.php file and my loop.php file.

I good example of the problem would be one the following link, see how on some properties i get one read more link and on others i get two.

Hope you can help

Andrew
loop.php
functions.php
0
Andy6350
Asked:
Andy6350
1 Solution
 
Ray PaseurCommented:
good example of the problem would be one the following link...

What link, please?
0
 
jeremyjared74Commented:
Possibly a misplaced div tag? It's hard to tell with the code you have given. I'm not sure what template file your using to display the loop in question. You could try using W3C Validator to check for mismatched div tags. If you have a div after an endif statement that has been a cause of similar issues for me.

http://validator.w3.org/#validate_by_uri+with_options
0
 
Andy6350Author Commented:
0
 
jeremyjared74Commented:
OK you probably have the_content("Read More"); in the loop and then you have a template tag that is calling the_excerpt(); which also adds the read more... link.

Another possibility could be your image tags aren't closing correctly. The output is this:
<img src=http://local-estateagent.co.uk/wp-content/themes/localestateagent/images/header-search-img.jpg width="920" height="314">

Open in new window


and should be this:

<img src="http://local-estateagent.co.uk/wp-content/themes/localestateagent/images/header-search-img.jpg" width="920" height="314" />

Open in new window


If they are dynamic images being called using PHP it would be one of these two, or something similar:

<img src="<?php bloginfo('template_url'); ?>/images/yourimage.jpg" />

Open in new window


or if it's a featured image it would be something like this:
<a href="<?php the_permalink(); ?>" title="<?php the_title();?>">
  <?php the_post_thumbnail(); ?>
</a>

Open in new window




0
 
gwkgCommented:
I think the problem is that in some posts you've actually included an excerpt and in some posts you left it blank.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now