Page 1 of 1

Disable bold in a part of a sentence

Posted: Fri Dec 16, 2022 6:22 am
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!

Re: Disable bold in a part of a sentence

Posted: Fri Dec 16, 2022 6:26 am
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.