This file contains hidden or 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 | |
/* Use this when parent theme used */ | |
wp_register_style('main-css', untrailingslashit( get_template_directory_uri() ).'css/main.css', ['bootstrap'], filemtime(untrailingslashit( get_template_directory() ).'css/main.css'), 'all'); | |
wp_enqueue_style('main-css'); | |
wp_register_script('main', untrailingslashit( get_template_directory_uri() ).'js/main.js', ['jquery', 'slick-slider'], filemtime(untrailingslashit( get_template_directory() ).'js/main.js'), true); | |
wp_enqueue_script('main'); | |
This file contains hidden or 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
/* Add this code at the top of the .htaccess file */ | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on [NC] | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> |
This file contains hidden or 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 | |
function bootstrap_pagination(){ | |
$allowed_tags = [ | |
'span' => [ | |
'class' => [] | |
], | |
'ul' =>[ | |
'class' => [], | |
], | |
'li' =>[ |
This file contains hidden or 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 | |
// //remove emoji support | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
// // Remove rss feed links | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); |
This file contains hidden or 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_terms = get_terms('career_category'); | |
foreach($custom_terms as $custom_term) { | |
wp_reset_query(); | |
$args = array('post_type' => 'career', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'career_category', | |
'field' => 'slug', |
This file contains hidden or 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.pac-container { | |
z-index: 99999999999 !important; | |
} |
This file contains hidden or 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
Follow this link: | |
https://developers.google.com/speed/webp/docs/webpshop | |
If you are getting error "webPshop.plugin cannot be opened because the developer cannot be verified" | |
Open up terminal. Type this command and then the name of the plugin. | |
sudo xattr -r -d com.apple.quarantine | |
For example: |
This file contains hidden or 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 | |
if(!function_exists('defer_parsing_of_js')) { | |
function defer_parsing_of_js($url) { | |
if (is_admin()) return $url; //don't break WP Admin | |
if (false === strpos($url, '.js')) return $url; | |
if (strpos($url, 'jquery.js')) return $url; | |
return str_replace(' src', ' defer src', $url); | |
} | |
} | |
add_filter('script_loader_tag', 'defer_parsing_of_js', 10); |