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
function ascendia_scripts() { | |
wp_enqueue_style( 'ascendia-style', get_stylesheet_uri() ); | |
wp_enqueue_style( 'ascendia-style-non-sass', get_template_directory_uri() . '/style-non-sass.css', array(), '20171001', 'all' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'ascendia_scripts' ); |
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
$prev_location = get_post_meta($post->ID, '_cottages_custom_postal_code', true ); | |
$lat = get_post_meta($post->ID, '_cottages_custom_location_latitude', true ); | |
$lng = get_post_meta($post->ID, '_cottages_custom_location_longitude', true ); | |
if ( | |
( | |
$cottages_meta['_cottages_custom_postal_code'] != '' && | |
$prev_location != $cottages_meta['_cottages_custom_postal_code'] | |
) || |
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
// Select all links with hashes | |
$('.menu-item-1385 a, .menu-item-1386 a, .menu-item-1387 a, .menu-item-1383 a') | |
.click( | |
function(event) { | |
// On-page links | |
// console.log(this); | |
if ( | |
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') |
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
<a | |
href="<?php | |
echo esc_url( | |
add_query_arg( | |
array( | |
'cv'=>'type-1', | |
'user'=>wp_get_current_user()->ID | |
), | |
'/print-cv-chronological/' | |
) |
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
function my_page_template_redirect() | |
{ | |
if ( is_category( 'uncategorized' ) ) { | |
$url = site_url( '/' ); | |
wp_safe_redirect( $url, 301 ); | |
exit(); | |
} | |
} | |
add_action( 'template_redirect', 'my_page_template_redirect' ); |
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
// https://kinsta.com/knowledgebase/remove-query-strings-static-resources/ | |
// Remove Query Strings From Static Resources With Code | |
function _remove_script_version( $src ){ | |
$parts = explode( '?', $src ); | |
return $parts[0]; | |
} | |
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); |
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
http://wpgear.org | |
WP-CLI - The command-line tool for managing WordPress. | |
https://github.com/wp-cli/wp-cli | |
WordPress-Coding-Standards | |
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards | |
WP Migrate DB - Migrates your database by running find & replace on URLs and file paths, handling serialized data, and saving an SQL file. | |
https://wordpress.org/plugins/wp-migrate-db/ |
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
var showingSlider = false; | |
function show_hide_div_on_scroll_jquery() { | |
if ($(window).scrollTop()>300) | |
{ | |
if (!showingSlider){ | |
showingSlider=true; | |
$('#header-hidden').animate({ | |
top: 0, | |
opacity: 1, |
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
define('WP_DEBUG', true); | |
// Enable Debug logging to the /wp-content/debug.log file | |
define('WP_DEBUG_LOG', true); | |
// Disable display of errors and warnings | |
define('WP_DEBUG_DISPLAY', false); | |
@ini_set('display_errors', 0); |