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 | |
/** | |
* The Template for displaying all single films. | |
* | |
* @package WordPress | |
* @subpackage Twenty_Ten | |
* @since Twenty Ten 1.0 | |
*/ | |
get_header(); ?> |
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
<?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 |
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 | |
/** | |
* Post Title | |
*/ | |
add_action('genesis_post_title', 'genesis_do_post_title'); | |
function genesis_do_post_title() { | |
if ( is_singular() ) { | |
$title = sprintf( '<h1 class="entry-title">%s</h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) ); | |
} |
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 | |
// article du codex: http://codex.wordpress.org/Class_Reference/WP_Query | |
// Query sur Catégories d'articles (ID) (inclure) | |
$ma_boucle = new WP_Query( 'cat=2,6,17,38' ); | |
// Query sur Catégories d'articles (ID) (exclure) | |
$ma_boucle = new WP_Query( 'cat=-12,-34,-56' ); |
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 un fichier de function dans votre thème | |
/** | |
* Hook pour retirer du texte | |
* @author Grégoire Noyelle | |
* @note bien mettre le paramètre et la référence à la classe. | |
*/ |
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 | |
add_filter( 'woocommerce_countries', 'gnwooc2_ajouter_pays' ); | |
function gnwooc2_ajouter_pays( $countries ) { | |
$new_countries = array( | |
'NIRE' => __( 'Irlande du NORD', 'woocommerce' ), | |
); | |
return array_merge( $countries, $new_countries ); | |
} |