Skip to content

Instantly share code, notes, and snippets.

View kriot1's full-sized avatar

Katrina kriot1

View GitHub Profile
@kriot1
kriot1 / favicon
Created September 23, 2013 23:48
/** Load custom favicon to header */
add_filter( 'genesis_pre_load_favicon', 'custom_favicon_filter' );
function custom_favicon_filter( $favicon_url ) {
return 'http://www.mydomain.com/wp-content/images/favicon.ico';
}
.instagram-image {
background-color: #fff;
margin: 0 10px 10px 0px !important;;
padding: 10px !important;
-moz-box-shadow: 0 0 5px #999;
-webkit-box-shadow: 0 0 5px #999;
box-shadow: 0 0 5px #999;
text-align: center !important;
}
.pins-feed-item {
padding: 7px !important;
background-color: #fff;
border: 1px #ddd !important;
margin: 0 0 12px 12px !important;
-moz-box-shadow: 0 0 5px #999;
-webkit-box-shadow: 0 0 5px #999;
box-shadow: 0 0 5px #999;
}
@kriot1
kriot1 / functions.php
Created December 1, 2013 07:26
Customize Jetpack Share Buttons
//* Add Jetpack share buttons above post
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
add_filter( 'the_content', 'sp_share_buttons_above_post', 19 );
add_filter( 'the_excerpt', 'sp_share_buttons_above_post', 19 );
function sp_share_buttons_above_post( $content = '' ) {
if ( function_exists( 'sharing_display' ) ) {
return sharing_display() . $content;
@kriot1
kriot1 / five-colums
Last active July 31, 2017 20:53
Column Classes via Genesis
<div class="one-fifth first">
This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.
</div>
<div class="one-fifth">
This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.
</div>
<div class="one-fifth">
This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind
</div>
<div class="one-fifth">
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); // removing the default shortlink
add_action( 'wp_head', 'bilty_shortlink_head'); // adding the new bit.ly shortlink
function bilty_shortlink_head() {
global $post;
$shortURL = get_post_meta($post->ID, 'bitlyURL', true);
if(!empty($shortURL)) {
echo '<link rel="shortlink" href="'.$shortURL.'" />'."\n";
} else {
echo '<link rel="shortlink" href="'.get_bloginfo('url').'?p='.$post->ID.'" />'."\n";
<div style="text-align:center">
adding on both end of the photo upload
</div>
<?php
echo "Hello World!";
?>
// Add the WooComm Account sub-navigation menu item to BuddyPress' Profile navigation array
add_action( 'bp_setup_nav', 'my_woo_info_nav' );
function my_woo_info_nav() {
global $bp;
$profile_link = trailingslashit( $bp->loggedin_user->domain . $bp->profile->slug );
bp_core_new_subnav_item( array( 'name' => __( 'Account', 'buddypress' ), 'slug' => 'account', 'parent_url' => $profile_link, 'parent_slug' => $bp->profile->slug, 'screen_function' => 'bp_woo_profile_subscription_screen', 'position' => 30, 'item_css_id' => 'accounthip' ) );
}
// This is the screen_function used by BuddyPress' navigation
function bp_woo_profile_subscription_screen() {
add_action( 'bp_template_title', 'bp_woo_profile_subscription_screen_title' );
@kriot1
kriot1 / functions.php
Last active August 29, 2015 14:22
ACF FAQ sections
// Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
}