Commit a0474902 authored by root's avatar root

add: counter of event registration requests

parent f6264d9c
* 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 -
* 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
function recup_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;
global $EM_Event;
/* @var $EM_Event EM_Event */
echo $EM_Event->output_single();
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment