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
//functions.php | |
function namespace_add_custom_types( $query ) { | |
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
$query->set( 'post_type', array( | |
'post', 'your-custom-post-type-here' | |
)); | |
return $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
//Define site URLS | |
define('WP_SITEURL', 'http://www.yoursite.net'); | |
define('WP_HOME', 'http://www.yoursite.net'); | |
//Change revision limits to keep database from overflowing | |
define( 'WP_POST_REVISIONS', 5 ); | |
//Change to force SSL | |
define( 'FORCE_SSL_LOGIN', false ); |
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
<script src="jquery.js"></script> | |
<script src="modernizr.js"></script> | |
<script> | |
$(document).ready(function(){ | |
if(!Modernizr.input.placeholder){ | |
$('[placeholder]').focus(function() { | |
var input = $(this); |
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 $item_terms = wp_get_object_terms($post->ID, 'your_taxonomy_name'); | |
if(!empty($item_terms)){ | |
if(!is_wp_error( $item_terms )){ | |
foreach($item_terms as $term){ | |
echo '<h2>'.$term->name.'</h2>'; | |
} | |
} | |
} | |
?> |
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 | |
//check for refering page to switch content based on referrer | |
$referrer = $_SERVER['HTTP_REFERER']; | |
if ($referrer == 'http://url.com' or $referrer == 'http://url-2.com') { | |
//Matches YES! | |
} else { | |
//Matches NO! | |
header( 'Location: http://www.url.com/no-soup-for-you/' ) ; |
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
MAIL INFORMATION: | |
To: [email protected] | |
From: [email protected] | |
Additional Headers: | |
Cc: [email protected] | |
bcc: [email protected] | |
Reply-to: [your-name] <[your-email]> |
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.wpcf7-response-output, div.wpcf7-validation-errors { display: none !important; } | |
span.wpcf7-not-valid-tip { display: none; } | |
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: red; background-color: rgba(153,0,0,0.3) !important; } | |
span.wpcf7-form-control-wrap {display:block !important;}/*keeps forms from jumping on render*/ |
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_value memory_limit 64M | |
php_value upload_max_filesize 64M | |
php_value post_max_size 64M | |
php_value max_execution_time 300 | |
php_value max_input_time 300 |
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
// Get First image for Blog section | |
function get_first_image() { | |
global $post, $posts; | |
$first_img = ''; | |
ob_start(); | |
ob_end_clean(); | |
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); | |
$first_img = ""; |
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
function wpmayor_filter_image_sizes( $sizes) { | |
unset( $sizes['thumbnail']); | |
unset( $sizes['medium']); | |
unset( $sizes['large']); | |
unset( $sizes['wysija-newsletters-max']); | |
return $sizes; | |
} | |
add_filter('intermediate_image_sizes_advanced', 'wpmayor_filter_image_sizes'); |