...
 
Commits (16)
# Theme-WordPress-Adullact-org
Theme WordPress pour Adullact.org
\ No newline at end of file
Theme WordPress pour Adullact.org
......@@ -18,7 +18,7 @@ function actualMonthYear($plus = 0)
}
$month = addZero($month);
$year = addZero($year);
return $month . "/01/" . $year;;
return $month . "/01/" . $year;
}
function addZero($number)
......
<?php
/*
* 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
*/
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 */
recup_nombre();
echo $EM_Event->output_single(); ?>
\ No newline at end of file
<?php
/**
* Single Event Template
* A single event. This displays the event title, description, meta, and
* optionally, the Google map for the event.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
*
* @package TribeEventsCalendar
* @version 4.6.19
*
*/
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();
$event_id = get_the_ID();
?>
<div id="tribe-events-content" class="tribe-events-single">
<p class="tribe-events-back">
<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( '&laquo; ' . esc_html_x( 'All %s', '%s Events plural label', 'the-events-calendar' ), $events_label_plural ); ?></a>
</p>
<!-- Notices -->
<?php tribe_the_notices() ?>
<?php the_title( '<h1 class="tribe-events-single-event-title">', '</h1>' ); ?>
<div class="tribe-events-schedule tribe-clearfix">
<?php echo tribe_events_event_schedule_details( $event_id, '<h2>', '</h2>' ); ?>
<?php if ( tribe_get_cost() ) : ?>
<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
<?php endif; ?>
</div>
<!-- Event header -->
<div id="tribe-events-header" <?php tribe_events_the_header_attributes() ?>>
<!-- Navigation -->
<nav class="tribe-events-nav-pagination" aria-label="<?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?>">
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>&laquo;</span> %title%' ) ?></li>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>&raquo;</span>' ) ?></li>
</ul>
<!-- .tribe-events-sub-nav -->
</nav>
</div>
<!-- #tribe-events-header -->
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- Event featured image, but exclude link -->
<?php echo tribe_event_featured_image( $event_id, 'full', false ); ?>
<!-- Event meta -->
<?php do_action( 'tribe_events_single_event_before_the_meta' ) ?>
<?php tribe_get_template_part( 'modules/meta' ); ?>
<?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>
<!-- Event content -->
<?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
<div class="tribe-events-single-event-description tribe-events-content">
<?php the_content(); ?>
</div>
<!-- .tribe-events-single-event-description -->
</div> <!-- #post-x -->
<?php if ( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) ) comments_template() ?>
<?php endwhile; ?>
<!-- Event footer -->
<div id="tribe-events-footer">
<!-- Navigation -->
<nav class="tribe-events-nav-pagination" aria-label="<?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?>">
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>&laquo;</span> %title%' ) ?></li>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>&raquo;</span>' ) ?></li>
</ul>
<!-- .tribe-events-sub-nav -->
</nav>
</div>
<!-- #tribe-events-footer -->
</div><!-- #tribe-events-content -->
\ No newline at end of file