Skip to content

Instantly share code, notes, and snippets.

<div id="wistia_3bfl0abrog" class="wistia_embed" style="width:640px;height:360px;"> </div>
<script charset="ISO-8859-1" src="http://fast.wistia.com/assets/external/E-v1.js"></script>
<script>
wistiaEmbed = Wistia.embed("3bfl0abrog", {
videoFoam: true
});
</script>
@grappler
grappler / functions.php
Created May 5, 2013 15:44
Loading stylesheets child and parent theme
<?php
/**
* Load child theme sytlesheets
*
*/
function child_theme_styles() {
wp_dequeue_style( 'parent-theme-style' );
wp_enqueue_style( 'child-theme-style', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'child_theme_styles' );
<?php
/**
* Load the stylesheet from the parent theme with theme version added automatically.
*
*/
function theme_name_parent_styles() {
$parent = get_template();
$parent = wp_get_theme( $parent );
<?php
/**
* Load the style sheet from the parent theme.
*
*/
function theme_name_parent_styles() {
// Enqueue the parent stylesheet
wp_enqueue_style( 'theme-name-parent-style', get_template_directory_uri() . '/style.css', array(), '0.1', 'all' );
<?php wp_enqueue_style( 'parent-theme-style', get_stylesheet_uri(), false, '2.0' ); ?>
<?php wp_head(); ?>
aar||aa|Afar|afar
abk||ab|Abkhazian|abkhaze
ace|||Achinese|aceh
ach|||Acoli|acoli
ada|||Adangme|adangme
ady|||Adyghe; Adygei|adyghé
afa|||Afro-Asiatic languages|afro-asiatiques, langues
afh|||Afrihili|afrihili
afr||af|Afrikaans|afrikaans
ain|||Ainu|aïnou
@grappler
grappler / settings.php
Last active December 19, 2015 03:39 — forked from kovshenin/plugin.php
<?php
/**
* Plugin Name: My Plugin
* Plugin Description: Settings API Demo
* Text Domain: my-plugin
*/
add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
jQuery(document).ready(function($){
$('.meta-color').wpColorPicker();
});
@grappler
grappler / hide-view.php
Last active February 6, 2023 03:24
Here is how to remove the "view" button from all three locations for a custom post type.
<?php
/**
* Hides the 'view' button in the post edit page
*
*/
function hv_hide_view_button() {
$current_screen = get_current_screen();
@grappler
grappler / cyberchimps-responsive.css
Last active December 20, 2015 23:29
cyberchimps responsive css without mobile menu
.container {
max-width: 1200px;
width: auto!important;
}
@media(max-width:979px) {
body {
padding-top: 0;
}
}