Popular Coupon Widget to Outgoing URL
I would like the popular coupon widget link to go directly to the affiliate link and not to the single coupon listing page.
(I turned off single-coupon pages on my theme, but the widget link still brings users there)
I am perfectly fine with code customization.
This is the code in question for
widgets.php (found in clipper/includes/widgets.php)
Code:
Code:
$result .= '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a> - ' . $comments_text . '</li>';
No matter what I change the
get_permalink() settings to, it will always make the link go to the single coupon listing, and not the affiliate link.
I would like this link to go directly to the affiliate code link. This would be
clpr_coupon_out_url or
clpr_coupon_aff_url.
I thought this would work by adding:
Code:
Code:
$url = get_post_meta( $post->ID, 'clpr_coupon_aff_url', true );
or
Code:
Code:
$url = get_post_meta( $post->ID, 'clpr_coupon_out_url', true );
and then changing get_permalink() to get_permalink($url) but it didn't work. Links still went to the single coupon listing page.
Please help as I want to eliminate the need for the single-coupon pages as much as possible, thanks.