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
RewriteEngine On | |
RewriteBase / | |
RewriteRule .* - [E=noabort:1] | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] |
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
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
var scroll_delay = 4000; | |
var top = 230; | |
var app = { | |
init: function(){ | |
var sel = window.location.hash; | |
// only autoscroll if ID is detected in the URL |
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 | |
add_filter( 'smart_seo_import_size', 'my_custom_csv_import_limit', 9, 1 ); | |
function my_custom_csv_import_limit($size){ | |
// reducing it to 5 to avoid server timeouts | |
return 5; | |
} | |
?> |
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 | |
add_filter( 'smart_seo_export_size', 'my_custom_csv_export_limit', 9, 1 ); | |
function my_custom_csv_export_limit($size){ | |
// reducing it to 25 to avoid server timeouts | |
return 25; | |
} | |
?> |
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
// e.g URL: https://google.com/?id=foo | |
// getQueryString('id') // retruns "foo" | |
getQueryString: function(field, url){ | |
var href = url ? url : window.location.href; | |
var reg = new RegExp( '[?&]' + field + '=([^&#]*)', 'i' ); | |
var string = reg.exec(href); | |
return string ? string[1] : null; | |
} |
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 | |
add_action( 'smart_seo_import_update', 'child_update_more_custom_fields', 10, 3 ); | |
function child_update_more_custom_fields($post_id, $data, $headings){ | |
// Where | |
// $post_id is post ID, | |
// '_custom_field_name' is the custom field name, | |
// 'column name' is column name found in CSV file | |
update_post_meta( $post_id, '_custom_field_name', sanitize_text_field( $data['column name']) ); | |
} | |
?> |
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 | |
add_filter( 'smart_seo_export_fields', 'child_export_other_custom_fields', 8, 1 ); | |
function child_export_other_custom_fields( $fields ){ | |
$fields[] = '_custom_field_name'; // _custom_field_name will exported to CSV as well | |
$fields[] = '_another_custom_field'; // _another_custom_field will exported to CSV as well | |
return $fields; | |
} | |
?> |
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 | |
add_filter( 'smart_seo_export_fields', 'my_theme_export_other_custom_fields', 8, 1 ); | |
function my_theme_export_other_custom_fields( $fields ){ | |
$fields[] = 'class_type'; // class_type will exported to CSV as well | |
$fields[] = 'fees'; // fees will exported to CSV as well | |
$fields[] = 'class_description'; // class_description will exported to CSV as well | |
return $fields; | |
} | |
add_action( 'smart_seo_import_update', 'my_theme_update_more_custom_fields', 10, 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
<script type="text/javascript"> | |
var app = { | |
init: function() { | |
window.addEventListener('scroll', function() { | |
if (window.__he == undefined) { | |
app.load(); | |
} | |
}); | |
window.addEventListener('mousemove', function() { |
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_filter( 'smart_seo_export_title', 'demo_export_default_seo_titles', 8, 2 ); | |
function demo_export_default_seo_titles( $title, $post ){ | |
// if no custom SEO title being defined, get global defaults for Yoast | |
if( class_exists('WPSEO_Option' ) && empty($title) ){ | |
$settings = get_option( 'wpseo_titles' ); | |
$title = $settings['title-' . $post->post_type]; | |
} |
OlderNewer