Disable bold in a part of a sentence

Web site design, graphics, logos, web development,templates design discussions.

Moderators: ushakumarik, DeviSri

Post Reply
Catherine
Posts: 36
Joined: Thu Apr 21, 2022 9:08 am
Contact:

Disable bold in a part of a sentence

Post by Catherine »

Hi,

?>
<p><h2><?php esc_attr_e( 'Print Invoice:', 'woo-invoice' ); ?> <a href="<?php echo esc_url_raw( $url ); ?>" target="_blank"><?php esc_attr_e( 'Open print view in browser', 'woo-invoice' ); ?></a></p>
<?php endif;

The output of the code above is :

Print Invoice: Open print view in browser

This whole sentence is bold because "Print Invoice" is in h2.

I want the "Open print view in browser" link not to be in BOLD.
Please, how do I fix the code to do this?

Thanks in advance!
Bella
Posts: 35
Joined: Wed Apr 13, 2022 6:27 am
Contact:

Re: Disable bold in a part of a sentence

Post by Bella »

Your h2 tag doesn't have a closing tag </h2>

Try this:

<p><h2><?php esc_attr_e( 'Print Invoice:', 'woo-invoice' ); ?></h2> <a href="<?php echo esc_url_raw( $url ); ?>" target="_blank"><?php esc_attr_e( 'Open print view in browser', 'woo-invoice' ); ?></a></p>
<?php endif;
Now it will cancel the h2 and the bold.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest