<?php
get_header();
$bc = get_post(3392);
echo do_shortcode($bc->post_content);
if(is_archive()) {
$args = array(
'post_type' => 'template_archive',
'posts_per_page' => -1,
);
$tpls = get_posts($args);
function getActiveMeta($tpl) {
$archive = get_queried_object()->name;
$value = get_post_meta($tpl->ID, '_tpl_archive_meta_key', true);
if($value == $archive) {
return true;
}
}
$arrfiltered = array_filter($tpls, 'getActiveMeta');
$firstKey = array_keys($arrfiltered)[0];
$post = $arrfiltered[$firstKey];
echo do_shortcode($post->post_content);
}
get_footer();
?>
<?php
get_header();
$bc = get_post(3392);
echo do_shortcode($bc->post_content);
if(is_archive()) {
$args = array(
'post_type' => 'template_archive',
'posts_per_page' => -1,
);
$tpls = get_posts($args);
function getActiveMeta($tpl) {
$archive = get_queried_object()->name;
$value = get_post_meta($tpl->ID, '_tpl_archive_meta_key', true);
if($value == $archive) {
return true;
}
}
$arrfiltered = array_filter($tpls, 'getActiveMeta');
$firstKey = array_keys($arrfiltered)[0];
$post = $arrfiltered[$firstKey];
echo do_shortcode($post->post_content);
}
get_footer();
?>
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
/**
* Fires immediately before including the template.
*
* @since 6.9.0
*
* @param string $template The path of the template about to be included.
*/
do_action( 'wp_before_include_template', $template );
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
| Key | Value |
| post_type | week-end |
| Key | Value |
| wp-wpml_current_language | fr |
| Key | Value |
| SERVER_SOFTWARE | Apache |
| REQUEST_URI | /tag/offre-du-moment/?post_type=week-end |
| USER | hifrance.org_rhikl4f4a5f |
| HOME | /var/www/vhosts/hifrance.org |
| SCRIPT_NAME | /index.php |
| QUERY_STRING | post_type=week-end |
| REQUEST_METHOD | GET |
| SERVER_PROTOCOL | HTTP/1.0 |
| GATEWAY_INTERFACE | CGI/1.1 |
| REDIRECT_QUERY_STRING | post_type=week-end |
| REDIRECT_URL | /tag/offre-du-moment/ |
| REMOTE_PORT | 44302 |
| SCRIPT_FILENAME | /var/www/vhosts/hifrance.org/httpdocs/index.php |
| SERVER_ADMIN | [no address given] |
| CONTEXT_DOCUMENT_ROOT | /var/www/vhosts/hifrance.org/httpdocs |
| CONTEXT_PREFIX | |
| REQUEST_SCHEME | https |
| DOCUMENT_ROOT | /var/www/vhosts/hifrance.org/httpdocs |
| REMOTE_ADDR | 18.97.14.91 |
| SERVER_PORT | 443 |
| SERVER_ADDR | 162.19.67.96 |
| SERVER_NAME | www.hifrance.org |
| SERVER_SIGNATURE | <address>Apache Server at www.hifrance.org Port 443</address> |
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| HTTP_ACCEPT_ENCODING | zstd, br, gzip |
| HTTP_ACCEPT_LANGUAGE | en-US,en;q=0.5 |
| HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
| HTTP_USER_AGENT | CCBot/2.0 (https://commoncrawl.org/faq/) |
| HTTP_CONNECTION | close |
| HTTP_X_ACCEL_INTERNAL | /internal-nginx-static-location |
| HTTP_X_REAL_IP | 18.97.14.91 |
| HTTP_HOST | www.hifrance.org |
| proxy-nokeepalive | 1 |
| SSL_TLS_SNI | www.hifrance.org |
| HTTPS | on |
| HTTP_AUTHORIZATION | |
| SCRIPT_URI | https://www.hifrance.org/tag/offre-du-moment/ |
| SCRIPT_URL | /tag/offre-du-moment/ |
| UNIQUE_ID | aeQO9tf8y-5rcgiS9ohghAAAAIg |
| REDIRECT_STATUS | 200 |
| REDIRECT_SSL_TLS_SNI | www.hifrance.org |
| REDIRECT_HTTPS | on |
| REDIRECT_HTTP_AUTHORIZATION | |
| REDIRECT_SCRIPT_URI | https://www.hifrance.org/tag/offre-du-moment/ |
| REDIRECT_SCRIPT_URL | /tag/offre-du-moment/ |
| REDIRECT_UNIQUE_ID | aeQO9tf8y-5rcgiS9ohghAAAAIg |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1776553718.3841 |
| REQUEST_TIME | 1776553718 |