Last active
October 5, 2018 11:57
-
-
Save moskalukigor/d86d48daa9eeee69b5bdf7d720d22e29 to your computer and use it in GitHub Desktop.
Add shortcode in cf7 with plugin Listo
This file contains 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_filter('listo_list_types', 'listo_list_types_func'); | |
function listo_list_types_func($list_types){ | |
$list_types['physicians'] = 'Listo_Physicians'; | |
return $list_types; | |
} | |
class Listo_Physicians implements Listo { | |
public static function items(){ | |
$args = array( | |
'post_type' => 'physicians', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
); | |
$query = new WP_Query($args); | |
$userData = array(); | |
$items[] = "Physicians"; | |
foreach($query->posts as $item) | |
{ | |
$items[$item->ID] = $item->post_title; | |
} | |
return $items; | |
} | |
public static function groups(){} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment