View Remove dashboard widgets
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
add_action('wp_dashboard_setup', 'rf_remove_dashboard_widgets' ); | |
function rf_remove_dashboard_widgets() { | |
// this function removes the standard dashboard widgets for all users, including the main admin | |
global $wp_meta_boxes; | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); |
View gist:1a188bfd8f5956af55e5
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
add_action( 'wp_before_admin_bar_render', 'rf_remove_toolbar_links' ); | |
function rf_remove_toolbar_links() { | |
// this function removes admin bar links for all users EXCEPT for user 1 | |
global $wp_admin_bar; | |
$theuserid = get_current_user_id(); | |
if ($theuserid != 1) { | |
$wp_admin_bar->remove_menu('themes'); // subitem themes | |
$wp_admin_bar->remove_menu('customize'); // subitem customize | |
$wp_admin_bar->remove_menu('widgets'); // subitem widgets | |
$wp_admin_bar->remove_menu('background'); // subitem background |
View quick fixes for barley css
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
.barley_editor_meta_wraper { | |
top:-50px !important; | |
} | |
#barley_editor_controls #barley_editor_insert_after, | |
#barley_editor_insert { | |
margin-top:-40px !important; | |
} | |
.barley_editor_main { |
View gist:c2f426453db9538ca6ff
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
@font-face { | |
font-family: 'scriptina'; | |
src: url('../font/scriptin-webfont.eot'); | |
src: url('../font/scriptin-webfont.eot?#iefix') format('embedded-opentype'), | |
url('../font/scriptin-webfont.woff') format('woff'), | |
url('../font/scriptin-webfont.ttf') format('truetype'), | |
url('../font/scriptin-webfont.svg#scriptinaregular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
View Basic link to optin form
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
<a href="#" class="manual-optin-trigger" data-optin-slug="paad3r32ws-lightbox">Click me!</a> |
View Gravity forms populate events
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
add_filter('gform_pre_render_2', 'rb_populate_posts'); | |
function rb_populate_posts( $form ) { | |
foreach( $form['fields'] as &$field ){ | |
if( strpos( $field['cssClass'], 'eventsselection' ) === false ) | |
continue; | |
$posts = get_posts( 'post_type=events&numberposts=-1' ); | |
$choices = array( | |
array( |
View Override Genesis 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
/** | |
* Use custom content for the loop | |
*/ | |
function rb_custom_loop() { | |
while(have_posts()) : the_post(); | |
?> | |
<article <?php post_class(); ?>> | |
<?php | |
$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) ); | |
printf( '%s', $img ); |
OlderNewer