Recent PostsWordPress

Get store url of wordpress clipper theme

Get store url of WordPress clipper theme

If you’re familiar with WordPress coupon site you may had use the WordPress clipper theme as parent theme.Also Discounty theme is a child another theme use with clipper theme.So when we’re customize the theme you want to get store url using coupon ID/post ID.This post is showing how to get easily store url using post ID.

How to get store url using post ID ?

$postID = 5;
$_taxonomy = 'stores'; // store slug
$term = get_the_terms( $postID, $_taxonomy );
$termID = '';
foreach ( $term as $trm ) {
	$termID =  $trm->term_id;
}
$stores_url = esc_url(get_metadata($_taxonomy, $termID, 'clpr_store_url', true));

How to get coupon code using post ID ?

    $postID = 5;
    $couponCode =  wptexturize( get_post_meta( $postID, 'clpr_coupon_code', true ) );

What's your reaction?

Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0

Comments are closed.

Next Article:

0 %