Created
July 20, 2020 12:26
-
-
Save farookibrahim/483d2b373080b7a53d7beb219dfb17fd to your computer and use it in GitHub Desktop.
Electro - Display "Made In:" meta below single product title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'el_child_custom_made_in_info' ) ) { | |
function el_child_custom_made_in_info() { | |
$made_in_country = get_post_meta( get_the_ID(), 'made_in_country', true ); | |
if( ! empty( $made_in_country ) ) { | |
?><div class="electro-made-in-country"> | |
<?php echo esc_html__( 'Made in:', 'electro' );?> <span><?php echo esc_html( $made_in_country ); ?></span> | |
</div><?php | |
} | |
} | |
} | |
add_action( 'woocommerce_single_product_summary', 'el_child_custom_made_in_info', 10 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.electro-made-in-country { | |
display: table-cell; | |
vertical-align: middle; | |
color: #8f8e94; | |
padding-right: 10px; | |
} | |
.electro-made-in-country span { | |
font-weight: 700; | |
} |
Author
farookibrahim
commented
Jul 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment