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
// optical-center | |
// | |
// Provide this mixin a padding value that you might normally apply equally to | |
// top and bottom padding on an element (e.g. so its contents are centered). | |
// | |
// It will, instead, give a bit more padding to the bottom and a bit less to the top so | |
// the element appears optically centered and takes up the same amount of room. | |
// | |
// The amount of padding that goes to the bottom vs the top is controlled by a second | |
// $ratio parameter that defaults to 1.3 |
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
#foundation-breakpoint-indicator:before { | |
content: 'NULL'; | |
display: block; | |
position: fixed; | |
top: 0; | |
left: 50%; | |
margin-left: -50px; | |
width: 100px; | |
background-color: blue; | |
text-align: center; |
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 | |
/** | |
* Return search array | |
*/ | |
function loopconf_search_array( $search_hash ) { | |
// check for existence of unique transient | |
if ( false === ( $search_array = get_transient( 'loopconf_search_' . $search_hash ) ) ) { | |
global $wpdb; |
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 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 |
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
//Update sponsor count | |
add_action("gform_after_submission_9", "update_sponsor_count_9", 10, 2); | |
function update_sponsor_count_9($entry, $form) { | |
//getting post and entry data | |
$sponsor_level = $entry["3"]; | |
$post_num = $entry["12"]; | |
$sponsors = get_post_meta($post_num, 'sponsors' , true); | |
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 | |
//Setup data to include in the form | |
if ( have_posts() ) while ( have_posts() ) : the_post(); | |
$child_name=get_the_title(); | |
$child_id=get_field('listing_code'); | |
$sponsor_count = get_field('sponsors'); | |
if (h1n_in_taxonomy('status', 'orphaned') || h1n_in_taxonomy('status', 'teacher')) { | |
$slots=5; |
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 | |
/** | |
* Plugin Name: Cpt In Main Query By Meta | |
* Plugin URI: http://wordpress.stackexchange.com/questions/129236/ | |
* Description: Allow mixing a post type with another on main query, only if the second match some meta query args | |
* Author: Giuseppe Mazzapica | |
* Author URI: http://wordpress.stackexchange.com/users/35541/g-m | |
*/ | |
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 | |
/* | |
* This asks first for a Yoast SEO meta description, | |
* If that's not present, then it asks for the excerpt of the post, | |
* If that's not present, then it strips the content | |
* In this case, I have an excerpt length setting in the Customizer | |
* Both the excerpt and content stripping, also strip shortcodes | |
* @author Matt Cromwell <reachme@mattcromwell.com> | |
* @copyright Copyright (c) 2014, Matt Cromwell | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
OlderNewer