Skip to content

Instantly share code, notes, and snippets.

View gregoirenoyelle's full-sized avatar

Grégoire Noyelle gregoirenoyelle

View GitHub Profile
@gregoirenoyelle
gregoirenoyelle / css-wp-editor-style.css
Created July 20, 2014 08:37
WordPress Editor Styles
@import url('style.css');
.mceContentBody {
background-color: #fff;
}
.mceContentBody .content {
padding: 15px 18px 10px;
width: 100%;
}
.mceContentBody ul {
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html>
<head>
<title>Ma page web</title>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
@gregoirenoyelle
gregoirenoyelle / 0_reuse_code.js
Created November 21, 2013 12:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
if ( get_field('gn_publier_bio') ) :
echo '<h3 class="bio-wordcampeur">Bio</h3>';
if ( in_array('biofr', get_field('gn_publier_bio') ) ) :
echo '<section class="bio-french">';
the_field('gn_bio');
endif;
echo '</section>';
if ( in_array('bioeng', get_field('gn_publier_bio') ) ) :
echo '<section class="bio-english">';
@gregoirenoyelle
gregoirenoyelle / acf-single-film.php
Last active December 8, 2018 16:46
ACF Single Film
<?php
/**
* The Template for displaying all single films.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<!DOCTYPE HTML>
<html>
<head>
<title>Ma page type</title>
<meta charset="utf-8">
</head>
<body>
<!-- commentaire dans le htlm -->
<p>Mon paragraphe <br />
/* Theme WordPress Genesis Sample (extrait) */
/* STYLES POUR ORDINATEUR */
html {
font-size: 62.5%; /* 10px browser default */
}
/* Chrome fix */
body > div {
<html>
<head>
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
.text-gras {font-weight: bold;}
</style>
<script type="text/javascript">
/*
<?php
/****
* New image size
* @gregoirenoyelle
****/
// Create a new image size
add_image_size('Vign Haut de Page', 266, 168, TRUE);
@gregoirenoyelle
gregoirenoyelle / add_action_genesis.php
Last active July 4, 2016 10:01
Genesis Framework Tricks
<?php
// Action conditionnelle sur des Contenus personnalisés
add_action('genesis_before_loop', 'gn_temoignages_filter');
function gn_temoignages_filter() {
if ( 'gnpost_temoignage' == get_post_type() || is_post_type_archive('gnpost_temoignage') ) :
remove_action('genesis_before_post_content', 'genesis_post_info');
remove_action('genesis_after_post_content', 'genesis_post_meta');
endif;
}