Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Show the summary in the title card

I want the summary to appear instead of the title when the card is hovered over.
That is, instead of:

<div class="cardpro-main" title="<?php the_title(); ?>" data-toggle="tooltip" data-placement="bottom">

I want to use the following code:

<div class="cardpro-main" title="<?php the_excerpt(); ?>" data-toggle="tooltip" data-placement="bottom">

When I use the code: title="<?php the_excerpt(); ?>"; The summary is displayed as: <p>summary</p>.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Is there a way to hide the <p></p> tag?

>Solution :

Please try this it will not show the p tag

    <?php echo get_the_excerpt(); ?>

As per your requirement below is the full code.

<div class="cardpro-main" title="<?php echo get_the_excerpt(); ?>" data-toggle="tooltip" data-placement="bottom">
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading