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
//remove dashboard items | |
function remove_dashboard_widgets() { | |
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']); |
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
//Start remove admin toolbar items | |
function remove_admin_toolbar_links() { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('wp-logo'); | |
$wp_admin_bar->remove_menu('updates'); | |
$wp_admin_bar->remove_menu('comments'); | |
$wp_admin_bar->remove_menu('builder'); | |
$wp_admin_bar->remove_menu('new-content'); | |
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 Admin Toolbar items | |
function easy_add_menu_items_to_toolbar() { | |
global $wp_admin_bar; | |
if (!is_super_admin() || !is_admin_bar_showing()) | |
return; | |
$wp_admin_bar->add_menu(array( | |
'id' => 'webdev_links', | |
'title' => __('Awesome WebDev'), | |
'href' => __('http://domain.com'), | |
)); |
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 your own dashboard widget | |
function my_custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
wp_add_dashboard_widget('custom_help_widget','Global Web Developer Inc','custom_dashboard_help'); | |
} | |
function custom_dashboard_help() { | |
echo '<p>Welcome to Custom Blog Theme! Need help? Contact the developer <a href="mailto:[email protected]">here</a>. For WordPress Tutorials visit: <a href="http://www.webdesign.com" target="_blank">WebDesign.com</a></p>'; | |
} | |
add_action('wp_dashboard_setup','my_custom_dashboard_widgets'); |
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
//set post title length | |
function maxTitleLength($title) { | |
global $post; | |
$title = $post->post_title; | |
if (str_word_count($title) >= 10) | |
wp_die( __('Error: your post title is over the maximum word count.')); | |
} | |
add_action('publish_post','maxTitleLength'); |
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
$custom_morelink = "Continue Reading the Full Article"; | |
function change_more_link($more_link, $more_link_text) { | |
return str_replace($more_link_text, $custom_morelink, $more_link); | |
} | |
add_filter('the_content_more_link', 'change_more_link', 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
<?php get_search_form(); ?> |
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 Builder 3.0 Support | |
add_theme_support( 'builder-3.0' ); | |
// Making all module outer wrappers full width | |
function it_set_full_width_container( $width ) { | |
remove_filter( 'builder_get_container_width', 'it_set_full_width_container' ); | |
return ''; |