как передать параметр в плагине wordpress

Я пытаюсь передать аргумент в функции и распечатать вывод в wordpress плагин i не смог передать параметр вот мой код

global $postidd; $postidd=$_REQUEST["postid"]; function getcontent($postidd) { // do something with the args if($postidd) { $args12 = array( 'p'=>15, 'post_type' => 'offers', 'orderby' => 'title', 'order' => 'ASC' ); $the_query12 = new WP_Query( $args12 ); if ( $the_query12->have_posts() ) : while ( $the_query12->have_posts() ) : $the_query12->the_post(); return $postidd; endwhile;endif; return $postidd; } }