Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
if(is_archive() || is_home() ){
add_filter( 'generate_has_default_loop', '__return_false' );
}
add_action( 'generate_before_main_content', function(){
if(is_home()){
if ( function_exists( 'wpsp_display' ) ) wpsp_display( 1794 );
}
if( is_archive() ){
$cat = get_category( get_query_var( 'cat' ) );
$cat_slug = $cat->slug;
if ( function_exists( 'wpsp_display' ) )
wpsp_display( 8033, 'tax_term="' . $cat_slug . '"'
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment