Skip to content

Instantly share code, notes, and snippets.

View kriot1's full-sized avatar

Katrina kriot1

View GitHub Profile
@kriot1
kriot1 / functions.php
Last active August 26, 2015 06:35
Add widgets to admin dashboard
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
// Add Widgets to admin dashboard
genesis_register_sidebar( array(
'id' => 'signup-top',
'name' => __( 'Signup Top', 'themename' ),
'description' => __( 'This is the top section of signup page.', 'themename' ),
) );
genesis_register_sidebar( array(
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' );
}
<i class="fa fa-check"></i> Google Friendly.
<i class="fa fa-cog fa-spin"></i> Make it spin like it's 2003!
<i class="fa fa-play"></i> Let it do the talking.
<div class="pricing-table"></div>
<div class="pricing-table">
<div class="one-third first">
</div>
<div class="one-third">
</div>
<div class="one-third">
</div>
</div>
@kriot1
kriot1 / pricing-table.html
Last active September 16, 2015 03:00
HTML for the pricing table
<div class="pricing-table">
<div class="one-third first">
<h4>Product One</h4>
<ul>
<li>Aewesome Thing</li>
<li>Aewesome Thing</li>
<li>Aewesome Thing</li>
<li>Aewesome Thing</li>
</ul>
<a class="button">$100</a>