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 | |
/** | |
* Gravity Wiz // Require Minimum Character Limit for Gravity Forms | |
* | |
* Adds support for requiring a minimum number of characters for text-based Gravity Form fields. | |
* | |
* @version 1.0 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/... |
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 4th image different size to query; LinkedIn post http://lnkd.in/dbxp28Z | |
* | |
*/ | |
/* Cleaner to write arguments separately; 'order_by' => 'date' is not necessary as that is the default */ | |
$args = array( | |
'post_type' => 'post', | |
'category_name' => 'uitgelicht', |
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 | |
/** | |
* Custom Walker used in Flatbook theme | |
* | |
* @source //themeforest.net/item/flatbook-flat-ebook-selling-wordpress-theme/6023410 | |
* @ref //lnkd.in/dRjx4R6 | |
*/ | |
class description_walker extends Walker_Nav_Menu{ | |
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0){ | |
//global $wp_query; |
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 following code is a copy of the code I recently used on the site of a client | |
* It uses the Aqua-Resizer script (https://github.com/syamilmj/Aqua-Resizer) to | |
* dynamically resize the slider images to the size needed. | |
* | |
* @source Piet Bos http://senlinonline.com | |
*/ | |
echo '<div class="slider-wrapper">'; |
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
<div id="posts"> | |
<?php | |
// Get category ID from Theme Customizer | |
$catID = get_theme_mod( 'tcx_category' ); | |
// Only get Posts that are assigned to the given category ID | |
$args = array( | |
'post_type' => 'post', | |
'cat' => $catID | |
); |
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 // Google+ post https://plus.google.com/u/0/116025569345227867532/posts/GcWYWECU7pd | |
include_once(ABSPATH.WPINC.'/feed.php'); | |
{ | |
$grss=get_post_meta($post->ID, 'rss', true); | |
$rss = fetch_feed($grss); | |
if (!is_wp_error($rss)) { // Checks that the object is created correctly | |
$maxitems = $rss->get_item_quantity(5); | |
$rss_items = $rss->get_items(0, $maxitems); | |
} |
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_action('init', 'wptips_custom_init'); | |
function wptips_custom_init() { | |
add_post_type_support( 'portfolio', array( 'page-attributes', 'comments', 'author' ) ); | |
} | |
?> |
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 | |
// In 3.5+, this hook allows you disable the Welcome Panel in the Dashboard. | |
// Removing the action also removes the corresponding Screen Option. | |
// source: http://codex.wordpress.org/Plugin_API/Action_Reference/welcome_panel | |
remove_action( 'welcome_panel', 'wp_welcome_panel' ); ?> |