Basic Email Us Adding a subject Email Us Adding CC and BCC Email Us Adding body text Email Us
Category: WordPress Backend
WordPress add to menu on the fly
add_filter( ‘wp_nav_menu_items’, ‘your_custom_menu_item’, 10, 2 ); function your_custom_menu_item ( $items, $args ) { //if (is_front_page()) { $items .= ‘<li>Show whatever</li>’; }else{ $items .= ‘<li>Show something else</li>’; } if ( is_page( array( ‘meet-the-group’, ‘contact-us’ ) ) || is_front_page()) { // either in about us, or contact, or management page is in view //$items .= ‘<li>Show whatever</li>’; […]
Eliminate Load More in media file – WP – WordPress
add_filter( ‘media_library_infinite_scrolling’, ‘__return_true’ );
Activate a plugin through PHPMyAdmin
37 I fixed this by going through PHPMyAdmin to the table “Options” and then the row active_plugins. I had the following stored there (formatted for readability): a:10:{ i:0;s:49:”1and1-wordpress-wizard/1and1-wordpress-wizard.php”; i:1;s:29:”acf-repeater/acf-repeater.php”; i:2;s:30:”advanced-custom-fields/acf.php”; i:3;s:45:”limit-login-attempts/limit-login-attempts.php”; i:4;s:27:”redirection/redirection.php”; i:6;s:33:”w3-total-cache/w3-total-cache.php”; i:7;s:41:”wordpress-importer/wordpress-importer.php”; i:8;s:24:”wordpress-seo/wp-seo.php”; i:9;s:34:”wpml-string-translation/plugin.php”; i:10;s:38:”wpml-translation-management/plugin.php”; } I added a new line (for the missing plugin) and incremented the a:10 to a:11 to indicate that there are now 11 […]
Disable update notification for individual plugins
if you don’t want WordPress to show update notifications for akismet, you will do it like: function filter_plugin_updates( $value ) { unset( $value->response[‘akismet/akismet.php’] ); return $value; } add_filter( ‘site_transient_update_plugins’, ‘filter_plugin_updates’ ); // remove update notice for forked plugins function remove_update_notifications( $value ) { if ( isset( $value ) && is_object( $value ) ) { unset( […]
WordPress Publish Post Hook
One of the best parts of WordPress is its hook/action system; this special hook system is WordPress’ way of assigning callbacks when certain events occur. One event that there seems to be a lot of confusion over is which hook to use to detect when a post is initially published. There’s the publish_post hook but […]
Add Custom CSS to WordPress Admin
Step 1: Create Your CSS File You can place the CSS file wherever you’d like; I’ve chosen to place the CSS file within my theme. My admin CSS file looks like: The CSS above makes tags more visible. It also will make any PRE element without a class more apparent, teling me I need to […]