* Remember that this file is only used if you have chosen to override event pages with formats in your event settings!
* You can also override the single event page completely in any case (e.g. at a level where you can control sidebars etc.), as described here - http://codex.wordpress.org/Post_Types#Template_Files
* Your file would be named single-event.php
*/
/*
* This page displays a single event, called during the the_content filter if this is an event page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*/
/*
Template Name: Compteur événement
*/
functionrecup_nombre()
{
global$wpdb;
$search="ag-adullact-2019";
$post="post_name";
$link=$_SERVER["REQUEST_URI"];
$cleared_link=explode("/",$link)[2];
$search=$cleared_link;
$query="SELECT count(meta_value) as number FROM wp5304_postmeta WHERE meta_value LIKE '%".$search."%' && meta_value LIKE '%".$post."%'";
$result=$wpdb->get_results($query);
echo"Nombre d'inscrits à l'événement : ".$result[0]->number;