Simple WordPress Tweaks for your Client’s Site

Customizing your client’s deployment of a WordPress website doesn’t need to be all that difficult. In fact – you can customize your client’s installation of WordPress at the same time you create the design & theme for them.

Every WordPress-powered website that Tinypint builds already includes the following scripts to customize our client’s view of their wordpress site:

Change ‘Posts’ to ‘Articles’


add_filter( 'gettext', 'change_post_to_article' );
add_filter( 'ngettext', 'change_post_to_article' );

function change_post_to_article( $translated ) {
$translated = str_ireplace( 'Post', 'Article', $translated ); // ireplace is PHP5 only
return $translated;
}

 Removing ‘Links’ from the Sidebar


add_action( 'admin_menu', 'tp_admin_menu' );
function tp_admin_menu() {
remove_menu_page('link-manager.php');
}

Adding your RSS Feed to their Dashboard

Getting news out to your clients is extremely important – make sure they get yours!


add_action('wp_dashboard_setup', 'tp_dashboard_widgets');
function tp_dashboard_widgets() {
global $wp_meta_boxes;
// remove unnecessary widgets
// var_dump( $wp_meta_boxes['dashboard'] ); // use to get all the widget IDs
unset(
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'],
$wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'],
$wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']
);
// add a custom dashboard widget
wp_add_dashboard_widget( 'dashboard_custom_feed', 'News from Tinypint', 'dashboard_tp_rss' ); //add new RSS feed output
}
function dashboard_tp_rss() {
echo '<div class="rss-widget">';
wp_widget_rss_output(array(
'url' => 'http://feeds.feedburner.com/tinypint',
'title' => 'The Latest from Tinypint',
'items' => 2,
'show_summary' => 1,
'show_author' => 0,
'show_date' => 1
));
echo "</div>";
}

Adding Your Company’s Name to their Admin Panel


add_filter( 'admin_footer_text', 'tp_admin_footer_text' );
function tp_admin_footer_text( $default_text ) {
return '<span id="footer-thankyou">Website managed by <a href="http://www.tinypintdesign.com">Tinypint Design & Consulting</a><span> | Powered by <a href="http://www.wordpress.org">WordPress</a>';
}