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'); |
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
// Create custom login | |
// redirects to a custom stylsheet | |
function custom_login_css() { | |
echo '<link rel="stylesheet" type="text/css" href="'.get_stylesheet_directory_uri().'/assets/css/style-login.css" />'; | |
} | |
add_action('login_head', 'custom_login_css'); | |
// Change the tool tip |
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
<h1> | |
<?php if (is_singular('your_cpt') || is_archive('your_cpt') || is_post_type_archive('your_cpt') ) { ?> | |
YOUR CPT NAME | |
<?php } elseif (is_search()) { ?> | |
Search | |
<?php } elseif (is_404()) { ?> | |
Error 404 | |
<?php } else { ?> | |
<?php the_field('headline_text'); ?> | |
<?php } ?> |
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
a[href^="tel"], a[href^="tel"]:visited, a[href^="tel"]:active, a[href^="tel"]:hover {color:inherit; cursor: text;} | |
a[href^="tel"]:hover {text-decoration: none;} |