This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gamme de couleur | |
*/ | |
function gn_gamme_couleur() { | |
// Ensemble de la gamme | |
return array ( | |
'black' => '#000000', | |
'dark-blue' => '#073559', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Affichage du HTML dans le block | |
* | |
* @author Grégoire Noyelle | |
* @since 1.0.0 | |
*/ | |
$template = array( | |
array( 'core/paragraph', array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Test composition Gut 1 | |
// A mettre dans un fichier de function dans votre thème ou dans les fichiers de votre extension | |
// Catégorie de Pattern | |
function acf_bloc_gutenberg_register_my_pattern_categories() { | |
// Vérifier si fonction existe | |
if (! function_exists('register_block_pattern_category') ) exit; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Function déclarée dans le fichier markup.php | |
function genesis_parse_attr( $context, $attributes = array(), $args = array() ) { | |
$defaults = array( | |
'class' => sanitize_html_class( $context ), | |
); | |
$attributes = wp_parse_args( $attributes, $defaults ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// A placer dans le fichier functions.php de votre thème sans le <?php du début | |
//* Fonction qui se déclenche 'after_setup_theme' | |
function gn_ajouter_fonction_font_theme_support() { | |
/*** | |
* Remplacer les tailles des polices du texte | |
* ici pour 'grand' cela donnera les classes suivantes: | |
* '.has-grand-font-size'... | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// A placer dans le fichier functions.php de votre thème sans le <?php du début | |
//* Fonction qui se déclenche 'after_setup_theme' | |
function gn_ajouter_fonction_color_theme_support() { | |
/*** | |
* Remplacer les couleurs par défaut (color et background-color) | |
* ici pour 'margenta-fort' cela donnera les classes suivantes: | |
* '.has-magenta-fort-background-color' et 'has-magenta-fort-color' | |
*/ | |
add_theme_support( 'editor-color-palette', array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
la classe .grille-equipe est ajoutée dans la balise body avec l'extension | |
Custom Body Class | |
https://fr.wordpress.org/plugins/wp-custom-body-class/ | |
*/ | |
/* Suppression des speudo éléments :before et :after qui sont comptés dans la grille */ | |
.grille-equipe .entry-content:before, | |
.grille-equipe .entry-content:after { | |
display: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Afficher le contenu du CPT au niveau de entry content | |
add_action('genesis_entry_content','gn_contenu_champs_acf'); | |
function gn_contenu_champs_acf() { | |
// Variable venant du champs ACF, stockée dans une variable. | |
$bio = get_field('cpt_biographie'); | |
// Mise en mémoire du fichier qui affiche le HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** CSS appliqués si le navigateur supporte grid layout ****/ | |
@supports (grid-area: auto) { | |
/* Ajustements des éléments principaux */ | |
.page-grille .entry-title { | |
background-color: #d8dad9; | |
margin-bottom: 2rem; | |
padding: 3rem; | |
text-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WooCommerce Login | |
* | |
* Afficher le formulaire de connexion dans votre thème | |
* | |
* @package WooCommerce | |
* @param $text is optionnal. Default text is: 'Se connecter' | |
* @author Grégoire Noyelle |
NewerOlder