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 | |
// custom header ID for backtotop | |
add_filter('genesis_attr_site-header','mytheme_header_id',1); | |
function mytheme_header_id($atts) { | |
$atts['id'] = "header"; | |
return $atts; | |
} | |
// back to top link |
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 | |
//* Remove the post meta function for front page only | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
//* Add support for Genesis Grid Loop | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'child_grid_loop_helper' ); | |
function child_grid_loop_helper() { | |
if ( function_exists( 'genesis_grid_loop' ) ) { |
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 | |
$header = array( | |
'default-image' => get_stylesheet_directory_uri().'/images/pageone.png', | |
'random-default' => false, | |
'width' => 320, | |
'height' => 60, | |
'flex-height' => true, | |
'flex-width' => true, | |
'default-text-color' => '#333333', |
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 | |
function auto_featured_image() { | |
global $post; | |
if (!has_post_thumbnail($post->ID)) { | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); | |
} |
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 | |
add_filter('manage_location_posts_columns' , 'add_post_columns'); | |
add_action( 'manage_location_posts_custom_column' , 'state_column', 10, 2 ); | |
function add_post_columns($columns) { | |
$columns['state'] = 'State/Territory'; | |
return $columns; | |
} |
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
tell application "Address Book" | |
set output to "" | |
repeat with this_person in every person | |
set numurl to count (urls of this_person) | |
if numurl > 0 then | |
set theurls to properties of urls of this_person | |
repeat with this_url in theurls | |
-- Capturing the urls and a new line | |
set output to output & (value of this_url as string) & return | |
if value of this_url contains "google.com" then |
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
tell application "Address Book" | |
set num to 0 | |
repeat with i from 1 to (count every person) | |
if (note of person i) is not equal to "" then | |
set note of person i to "" | |
set num to num + 1 | |
end if | |
end repeat | |
display dialog "Removed " & num & " notes." buttons {"OK"} | |
save |
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
# strip '.html' off any requests except in the dashboard | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/?(wp-admin|wp-includes)/(.*)$ | |
RewriteRule ^(.*)\.html$ http://example.com/$1 [R=301,L] |