Claudiu Creanga
Claudiu Creanga

Reputation: 8366

Introduce php code inside arguments of the_title

I have this effect: http://jsfiddle.net/CgF7a/ that I want to implement for every title in my loop. My code is:

<a class="roll-link" href="<?php the_permalink(); ?>"><?php the_title('<h7>', '<h7>'); ?></a>

and I want to introduce

<span data-title="<?php the_title(); ?>"></span>

instead of those h7 tags. This is not working:

<a class="roll-link" href="<?php the_permalink(); ?>"><?php the_title('<span data-title="<?php the_title(); ?>">', '</span>'); ?></a>

How to introduce php code inside the arguments of the_title?

Upvotes: 0

Views: 58

Answers (1)

Shakti Patel
Shakti Patel

Reputation: 3862

can you please used this : please folow below given screenshot for display

enter image description here

Upvotes: 1

Related Questions