updating querries
This commit is contained in:
parent
10dfc1beff
commit
059895adf6
|
|
@ -34,6 +34,8 @@ function tailpress_setup() {
|
||||||
|
|
||||||
add_theme_support( 'editor-styles' );
|
add_theme_support( 'editor-styles' );
|
||||||
add_editor_style( 'css/editor-style.css' );
|
add_editor_style( 'css/editor-style.css' );
|
||||||
|
|
||||||
|
// add_post_type_support( 'page', 'excerpt' );
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action( 'after_setup_theme', 'tailpress_setup' );
|
add_action( 'after_setup_theme', 'tailpress_setup' );
|
||||||
|
|
@ -121,6 +123,8 @@ function tailpress_nav_menu_add_submenu_class( $classes, $args, $depth ) {
|
||||||
add_filter( 'nav_menu_submenu_css_class', 'tailpress_nav_menu_add_submenu_class', 10, 3 );
|
add_filter( 'nav_menu_submenu_css_class', 'tailpress_nav_menu_add_submenu_class', 10, 3 );
|
||||||
|
|
||||||
|
|
||||||
// require_once( __DIR__ . '/includes/errorlog.php');
|
|
||||||
require_once( __DIR__ . '/includes/blocks.php');
|
require_once( __DIR__ . '/includes/blocks.php');
|
||||||
|
require_once( __DIR__ . '/includes/post_types.php');
|
||||||
|
// require_once( __DIR__ . '/includes/taxonomy.php');
|
||||||
|
// require_once( __DIR__ . '/includes/errorlog.php');
|
||||||
// require_once( __DIR__ . '/includes/logos.php');
|
// require_once( __DIR__ . '/includes/logos.php');
|
||||||
|
|
@ -15,7 +15,7 @@ function client_add_block_categories( $categories ) {
|
||||||
$categories
|
$categories
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
add_action( 'block_categories', 'client_add_block_categories', 10, 2 );
|
add_action( 'block_categories_all', 'client_add_block_categories', 10, 2 );
|
||||||
|
|
||||||
|
|
||||||
// ##### Blocks 🡒 Déclaration des blocks acf custom
|
// ##### Blocks 🡒 Déclaration des blocks acf custom
|
||||||
|
|
@ -26,10 +26,10 @@ function acf_custom_client_blocks_init()
|
||||||
|
|
||||||
// ##### Home 🡒 Hero Section
|
// ##### Home 🡒 Hero Section
|
||||||
acf_register_block_type(array(
|
acf_register_block_type(array(
|
||||||
'name' => 'home_section',
|
'name' => 'home_header',
|
||||||
'title' => __("Home — Section d'accueil"),
|
'title' => __("Home — Section d'accueil"),
|
||||||
'description' => __("Brique de vidéo pour la section d'acccueil"),
|
'description' => __("Brique pour la section d'acccueil"),
|
||||||
'render_template' => 'template-parts/blocks/home/home_hero/home_hero.php',
|
'render_template' => 'template-parts/blocks/home/home_header/home_header.php',
|
||||||
'category' => 'client_blocks',
|
'category' => 'client_blocks',
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'mode' => 'auto',
|
'mode' => 'auto',
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
define( 'WP_DEBUG', true );
|
||||||
|
define( 'WP_DEBUG_LOG', true );
|
||||||
|
define( 'WP_DEBUG_DISPLAY', false );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ##### Template parts 🡒 Get templates parts
|
// ##### Template parts 🡒 Get templates parts
|
||||||
|
|
||||||
get_template_part( 'template-parts/blocks/the-file', null,
|
get_template_part( 'template-parts/blocks/the-file', null,
|
||||||
|
|
@ -14,7 +20,12 @@
|
||||||
|
|
||||||
// ##### Query 🡒 Get posts
|
// ##### Query 🡒 Get posts
|
||||||
|
|
||||||
$args = array('fields' => 'ids');
|
$args = array(
|
||||||
|
'fields' => 'ids',
|
||||||
|
'post_type' => 'restaurants',
|
||||||
|
'posts_per_page' => -1
|
||||||
|
|
||||||
|
);
|
||||||
$posts = get_posts($args);
|
$posts = get_posts($args);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
30
includes/taxonomy.php
Normal file
30
includes/taxonomy.php
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function add_custom_taxonomies() {
|
||||||
|
register_taxonomy('thematiques', 'post', array(
|
||||||
|
|
||||||
|
// 'hierarchical' => true,
|
||||||
|
|
||||||
|
// This array of options controls the labels displayed in the WordPress Admin UI
|
||||||
|
'labels' => array(
|
||||||
|
'name' => _x( 'Thématiques', 'taxonomy general name' ),
|
||||||
|
'singular_name' => _x( 'Thématique', 'taxonomy singular name' ),
|
||||||
|
'search_items' => __( 'Chercher une Thématique' ),
|
||||||
|
'all_items' => __( 'Toutes les Thématiques' ),
|
||||||
|
'parent_item' => __( 'Thématique Parent' ),
|
||||||
|
'parent_item_colon' => __( 'Thématique Parent:' ),
|
||||||
|
'edit_item' => __( 'Editer la Thématique' ),
|
||||||
|
'update_item' => __( 'Mettre à jour la Thématique' ),
|
||||||
|
'add_new_item' => __( 'Ajouter une Thématique' ),
|
||||||
|
'new_item_name' => __( 'Nom de la nouvelle Thématique' ),
|
||||||
|
'menu_name' => __( 'Thématiques' ),
|
||||||
|
),
|
||||||
|
// Control the slugs used for this taxonomy
|
||||||
|
'rewrite' => array(
|
||||||
|
'slug' => 'thematiques', // This controls the base slug that will display before each term
|
||||||
|
// 'with_front' => false, // Don't display the category base before "/locations/"
|
||||||
|
'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
add_action( 'init', 'add_custom_taxonomies', 0 );
|
||||||
|
|
@ -2,4 +2,20 @@
|
||||||
@import "tailwindcss/components";
|
@import "tailwindcss/components";
|
||||||
@import "tailwindcss/utilities";
|
@import "tailwindcss/utilities";
|
||||||
|
|
||||||
@import "custom.css";
|
@import "custom.css";
|
||||||
|
|
||||||
|
/* ########### GENERAL ############ */
|
||||||
|
@import "typography.css";
|
||||||
|
|
||||||
|
/* ########### COMPONENTS ############ */
|
||||||
|
@import "components/header.css";
|
||||||
|
@import "components/cta.css";
|
||||||
|
@import "components/section.css";
|
||||||
|
@import "components/footer.css";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ########### BLOCKS ############ */
|
||||||
|
|
||||||
|
/* Home */
|
||||||
|
@import "../../template-parts/blocks/home/home_header/home_header.css";
|
||||||
|
|
|
||||||
0
resources/css/components/cta.css
Normal file
0
resources/css/components/cta.css
Normal file
0
resources/css/components/footer.css
Normal file
0
resources/css/components/footer.css
Normal file
0
resources/css/components/header.css
Normal file
0
resources/css/components/header.css
Normal file
0
resources/css/components/section.css
Normal file
0
resources/css/components/section.css
Normal file
0
resources/css/typography.css
Normal file
0
resources/css/typography.css
Normal file
0
template-parts/blocks/home/home_header/home_header.css
Executable file
0
template-parts/blocks/home/home_header/home_header.css
Executable file
17
template-parts/blocks/home/home_header/home_header.php
Executable file
17
template-parts/blocks/home/home_header/home_header.php
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
$home_header = get_field('home_header');
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 class="text-center"><?php echo $home_header['title'] ?></h1>
|
||||||
|
|
||||||
|
|
||||||
|
<section class="home_header header_top">
|
||||||
|
<div class="hero_content">
|
||||||
|
|
||||||
|
<h1 class="text-center "><?php echo $home_header['title'] ?></h1>
|
||||||
|
<p class="text-center" ><?php echo $home_header['introduction_text'] ?></p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
.video_hero{
|
|
||||||
@apply bg-primary;
|
|
||||||
height: 100vh;
|
|
||||||
min-height: 650px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
video{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
.hero_content{
|
|
||||||
opacity: 0.9999;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-family: "Causten";
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
max-width: 700px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
|
|
||||||
}
|
|
||||||
p{
|
|
||||||
@apply max-w-md;
|
|
||||||
padding: 40px 0;
|
|
||||||
text-align:center;
|
|
||||||
}
|
|
||||||
a{
|
|
||||||
border: 1px solid white;
|
|
||||||
padding: 10px 40px;
|
|
||||||
border-radius: 28px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?php
|
|
||||||
$home_video_hero = get_field('home_video_hero');
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<section class="video_hero header_top">
|
|
||||||
<video class="test" autoplay muted loop playsinline ?>">
|
|
||||||
<source src="<?php echo get_template_directory_uri() . '/resources/video/Semlex_Homecover_hero.mp4' ?>" type="video/mp4">
|
|
||||||
Your browser does not support the video tag.
|
|
||||||
</video>
|
|
||||||
<div class="hero_content">
|
|
||||||
|
|
||||||
<h1 class="text-center text-white"><?php echo $home_video_hero['main_title'] ?></h1>
|
|
||||||
<p class="text-center text-white" ><?php echo $home_video_hero['text'] ?></p>
|
|
||||||
<a class="text-center mx-auto w-fit text-white" href=""><?php echo $home_video_hero['button']['title'] ?></a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user