Support

Home Forums Event Espresso Premium HTML problem with featured image

HTML problem with featured image

Posted: April 13, 2015 at 11:36 am


Kendra Borgen

April 13, 2015 at 11:36 am

Something seems to be going wrong with the featured image. It shows a bit of HTML as site content. Any idea what might be going wrong?

http://www.iamsdardam.com/?post_type=espresso_events


Lorenzo Orlando Caum

  • Support Staff

April 13, 2015 at 11:58 am

Hi Kendra,

We are trying to pinpoint where this is coming from. Could you login to your WP dashboard and go to Event Espresso –> General Settings –> Templates and temporarily turn off the status banners?

Also, could you enable pretty permalinks for your site through WP-admin –> Settings –> Permalinks (select post name)?

Thanks


Lorenzo


Kendra Borgen

April 14, 2015 at 3:35 pm

Thanks Lorenzo,
The piece of code indeed dissapears the moment i turn off the status banners. Thats where to problem seems to be. Any advice on how to fix this?
Thanks


Dean

April 15, 2015 at 2:52 am

Hi,

Have you modified any Event Espresso files?

Could you (temporarily) swap to the Parent Theme (Solon) and see if the issue persists with that theme?


Kendra Borgen

April 15, 2015 at 4:04 am

Hi Dean,
I changed to the parent theme but the issue is still there. I have not modified any of the EE files.


Tony

  • Support Staff

April 15, 2015 at 5:05 am

Hi Kendra,

Looking at the code it seems there is a span within the title field – http://take.ms/SNpKh

Can you check the title field for your feature image, is it wrapped in a span tag?


Kendra Borgen

April 15, 2015 at 5:23 am

There seems to be a problem with this piece of code in my content.php
<a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>" >

If i remove "title="<?php the_title(); ?>" it works fine. But i think maybe the span class is added by Event Espresso?


Tony

  • Support Staff

April 15, 2015 at 6:30 am

Hi Kendra,

Yes that’s the problem, the status banner uses the_title() to output the banner.

The theme should not be using the_title() for the title attribute, there is another function for that – the_title_attribute()

If you copy content.php to your child theme.

Then change this line:

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" >

to this:

<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >


Kendra Borgen

April 15, 2015 at 7:13 am

Thank you! Problem resolved.

Excuse me for my bad wordpress skills and thanks for your time!

The support post ‘HTML problem with featured image’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso