Skip to content

Instantly share code, notes, and snippets.

helgatheviking / wpalchemy-tinymce-template.php
Created Feb 11, 2012 — forked from mamouneyya/wpalchemy-tinymce-template.php
Repeatable and sortable TinyMCE fields for WP Alchemy class
View wpalchemy-tinymce-template.php
<?php while($mb->have_fields_and_multi('GROUP-NAME')): ?>
<?php $mb->the_group_open(); ?>
<p class="update-warning">Remember, you must save the page for the sort order to take effect.</p>
<?php $metabox->the_field('CONTENT-FIELD'); ?>
<label for="<?php $metabox->the_name(); ?>">FIELD LABEL</label>
<div class="customEditor">
<textarea rows="10" cols="50" name="<?php $mb->the_name(); ?>" id="<?php $mb->the_name(); ?>"><?php $mb->the_value(); ?></textarea>
helgatheviking / editor_meta.php
Created Feb 15, 2012 — forked from bicyclista/wpalchemy wp_editor()
wpalchemy metaboxes VS. wordpress wp_editor()
View editor_meta.php
<div class="my_meta_control">
<?php $mb->the_field('test_editor');
$settings = array(
'textarea_rows' => '10',
'media_buttons' => 'false',
'tabindex' =>2
helgatheviking / flexslider.css
Created Apr 13, 2012
Show attachments as flexslider carousel on single posts
View flexslider.css
* jQuery FlexSlider v1.8
* Copyright 2012 WooThemes
* Free to use under the MIT license.
/* Browser Resets */
helgatheviking / custom-post-type-archive-menu-links.php
Created May 4, 2012
Adds Custom Post Type archives to the WordPress-powered menus
View custom-post-type-archive-menu-links.php
Plugin Name: Custom Post Type Archive Menu Links
Plugin URI:
Description: Easily Add Custom Post Type Archives to the Nav Menus
Version: 1.0
Author: soulseekah
Author URI:
License: GPL2
View content-extensions.php
* Content Extensions
* @package ThematicCoreLibrary
* @subpackage ContentExtensions
* @todo revisit docblock desciptions & tags
helgatheviking / functions.php
Created Jul 7, 2013
Example of a working WP_User_Query search by simple user meta using Simple User Listing In this example I am searching for users by the meta field "billing_city"
View functions.php
* Place this in your theme's functions.php file
* Or a site-specific plugin
// Switch the WP_User_Query args to a meta search
function kia_meta_search( $args ){
helgatheviking / functions.php
Created Jul 17, 2013
A repeating text field for Options Framework
View functions.php
// add this to your theme's functions.php
* Define a custom option type
* this type will repeat some text inputs
function repeat_text_option_type( $option_name, $option, $values ){
$counter = 0;
View Fluid-Grid-Using-Text-align:-Justify.markdown

Fluid Grid Using Text-align: Justify

A new technique for responsive grids I've been working on which uses inline-block and text-align: justify.

Take a look at this article for an explanation of the fundamentals of the technique:

Essentially, margins are calculated by the browser and never specified in the CSS. This saves a lot of tedious work! Also by not having to use floats, clearfixes, or nth-child, we avoid many common problems associated with more traditional methods.

helgatheviking / KIA-comment-blacklist.txt
Last active Jan 28, 2023
Customizing the WordPress Install Process with install.php - All files go in your /wp-content/ folder.
View KIA-comment-blacklist.txt
helgatheviking / functions.php
Last active Aug 29, 2015
WooCommerce Name Your Price: Filter price input field to not show suggested/minimum prices
View functions.php
function woocommerce_nyp_price_input_no_price( $html, $product_id, $prefix ) {
// only get the posted price (price submitted on add-to-cart) otherwise NULL
$price = WC_Name_Your_Price_Helpers::get_posted_price( $product_id, $prefix );
return sprintf( '<input id="nyp%s" name="nyp%s" type="text" value="%s" size="6" title="nyp" class="input-text amount nyp-input text" />', $prefix, $prefix, WC_Name_Your_Price_Helpers::format_price( $price ) );
add_filter( 'woocommerce_get_price_input', 'woocommerce_nyp_price_input_no_price', 10, 3 );