Link to home
Start Free TrialLog in
Avatar of Andy6350
Andy6350

asked on

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
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

good example of the problem would be one the following link...

What link, please?
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
Avatar of Andy6350
Andy6350

ASKER

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




ASKER CERTIFIED SOLUTION
Avatar of gwkg
gwkg
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial