Skip to content

Instantly share code, notes, and snippets.

Avatar

Wil Ransz wilransz

View GitHub Profile
View MijnWerkbalkMenu.php
function webpoli_admin_menu() {
global $wp_admin_bar;
$menu_id = 'webpoli';
$wp_admin_bar->add_menu(array(
'id' => $menu_id,
'title' => __('Mijn Menu'),
'href' => '#'));
$wp_admin_bar->add_menu(array(
'parent' => $menu_id,
'title' => __('Concepten'), 'id' =>
View GoogleWebFonts2014functions.php
<?php
/* Google Web Fonts */
function wpzaken_google_fonts() {
echo "<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>";
}
add_action( 'wp_head', 'wpzaken_google_fonts', 5);
View GoogleWebFonts2014header.php
<?php
/**
* The Header for our theme
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
View GoogleWebFonts2014childRaleway.css
/*
Theme Name: Twenty Fourteen Child
Template: twentyfourteen
*/
@import url(../twentyfourteen/style.css);
@import url(http://fonts.googleapis.com/css?family=Raleway:400,700);
View GoogleWebFonts2014childLato.css
/*
Theme Name: Twenty Fourteen Child
Template: twentyfourteen
*/
@import url(../twentyfourteen/style.css);
@wilransz
wilransz / googlewebfonts.js
Last active Aug 29, 2015
Google Web Fonts met JavaScript
View googlewebfonts.js
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Raleway:400,700:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
@wilransz
wilransz / selectie-wp-config-sample.php
Last active Aug 29, 2015
Relevant gedeelte van de wp-config-sample.php van WordPress versie 3.9.2
View selectie-wp-config-sample.php
<?php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');
/** MySQL database username */
define('DB_USER', 'username_here');
/** MySQL database password */
@wilransz
wilransz / wp-config-sample.php
Created Sep 1, 2014
wp-config-sample.php van WordPress versie 3.9.2
View wp-config-sample.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@wilransz
wilransz / 2012-custom-footer-segment4.php
Created Aug 14, 2014
Het verschil tussen deze versie en 2012-custom-footer-segment3.php, is dat hier in het eerste deel zoveel mogelijk gebruik wordt gemaakt van WordPress template tags. #wpZaken
View 2012-custom-footer-segment4.php
@wilransz
wilransz / 2012-custom-footer-segment3.php
Last active Aug 29, 2015
Nog een keer de HTML versie van het aangepaste segment van de footer.php van het TwentyTwelve thema, maar dit keer met een jaartal in PHP formaat. #wpZaken
View 2012-custom-footer-segment3.php