Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from theukedge/gist:6565865
Created October 16, 2013 04:42
Show Gist options
  • Select an option

  • Save jamiemitchell/7002737 to your computer and use it in GitHub Desktop.

Select an option

Save jamiemitchell/7002737 to your computer and use it in GitHub Desktop.
<?php
if( get_post_meta( get_the_ID(), 'diww_sponsored', true ) == 'sponsored' ) {
if( get_post_meta( get_the_ID(), 'diww_sponsored_type', true ) == 'giveaway' ) {
$sponsored_content = '<p class="sponsored">This is a sponsored giveaway.</p>';
$sponsored_content .= $content;
return $sponsored_content;
}
if( get_post_meta( get_the_ID(), 'diww_sponsored_type', true ) == 'review' ) {
$sponsored_content = '<p class="sponsored">This is a sponsored review.</p>';
$sponsored_content .= $content;
return $sponsored_content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment