Forked from tomfinitely/gsfw-targeted-instance.php
Last active
October 13, 2015 16:40
-
-
Save wpsmith/195a065a22fa247b0938 to your computer and use it in GitHub Desktop.
Genesis Sandbox Featured Content Widget - Targeted Instance
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
<?php | |
//* Add "See All Videos" Link to Featured Videos | |
add_action( 'wp_head', 'target_gs_ftd' ); | |
function target_gs_ftd() { | |
if ( is_active_widget( true, 'featured-content-3', 'featured-content', true ) ) { | |
add_filter( 'gsfc_after_loop', 'featured_content_3' ); | |
function featured_content_3( $instance ) { | |
if ( 3 != $instance['custom_field'] ) { | |
return; | |
} | |
echo '<div class="more-wrapper"><a href="http://www.su.app/shenandoah-today/videos/">See All Videos</a></div>'; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment