• Resolved vzwkz1

    (@vzwkz1)


    Hello,

    I have a dev environment running in Win10 and Laragon (wamp) where I have a wordpress site using GeneratePress theme (and GP Premium plugin) and the Seriously Simple Podcasting plugin. The SSP plugin has several filters that can be used. One of them “ssp_episode_query_args” can be used to set selection arguments. See code below.
    The code is stored and activated in Code Snippets BUT I can’t see any effect of it being executed. I have changed the array values to “illegal values” and other changes so see what happens but no matter what I do there is no change in the result. To make the verification I run a URL that should show the existing Pod episodes based on the filter critera from the code below. BUT it always displays the same thing – all existing episodes.

    I have other code snippets that works without problem.

    What can be the problem? Any suggestions?

    //Hook into the ssp_episode_query_args to show episode stats for all public and private podcasts
    add_filter( 'ssp_episode_query_args', 'ssp_episode_query_args_callback', 10, 2 );
    function ssp_episode_query_args_callback( $args, $context ) {
    	if ( 'stats' !== $context ) {
    		return $args;
    	}
    	$args['post_status'] = array( 'publish', 'private' );
    	return $args;
    }

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t get the add_filter code to execute’ is closed to new replies.