Support » Plugin: Contact Form 7 - Post Fields » Show only child pages

  • Resolved toasterdroid

    (@toasterdroid)


    I love the plugin, thanks! I however, need to show only child pages of my custom post type. Is there a way to go about doing this? I’m comfortable adding a little jQuery or PHP if that’s what’s needed.

Viewing 1 replies (of 1 total)
  • Plugin Author Markus Froehlich

    (@markusfroehlich)

    Hello toasterdroid!
    Yes you can use the “wpcf7_yourtag_get_posts” filter in your functions.php file.

    For example:

    
    add_filter("wpcf7_yourtag_get_posts", "filter_child_posts");
    
    function filter_child_posts($post_args)
    {
    	$post_args['post_parent'] = '12345';
    
    	return $post_args;
    }
    

    Best regards
    Markus

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.