Hooks

Change Sender Name And Email in Outgoing WordPress Email

By default, when we sends an email notification it uses ‘WordPress’ as the sender name. This looks unprofessional and we can change it to a real person or your website title. For this we use two wordpress hook. ‘wp_mail_from’ ‘wp_mail_from_name’ We can easily change that by adding this code to our theme’s functions file. // …

Change Sender Name And Email in Outgoing WordPress Email Read More »

WordPress : Add Admin User in WordPress By FTP client

This happens many times when we forget the login password of WordPress, Not to worry, we can add it by adding this code to your theme’s functions file using FTP client. function AddAdminAccount(){   $user = ‘NewUsername’;   $pass = ‘Password’;   $email = ‘new@email.com’;   if ( !username_exists( $user ) && !email_exists( $email ) ) {     $user_id = …

WordPress : Add Admin User in WordPress By FTP client Read More »

Adding Sidebar in WordPress Themes

This is one of the most used Requirements For many developers. For adding custom sidebars in WordPress theme Paste the following code in your functions.php file: function CustomSidebars() {   $args = array(     ‘id’ => ‘custom_sidebar’,     ‘before_title’ => ‘<h4 class=”widget-title”>’,     ‘after_title’ => ‘</h4>’,     ‘name’ => __( ‘Newly Added Custom Widget’, ‘text_domain’ ),     ‘description’ => __( ‘My …

Adding Sidebar in WordPress Themes Read More »

Add Custom Dashboard Widgets in WordPress

We have seen many widgets that are added by plugins and themes in the WordPress dashboard. we can add one by pasting the following code: add_action(‘wp_dashboard_setup’, ‘CustomDashboardWidgets’); function CustomDashboardWidgets() {   global $wp_meta_boxes;   wp_add_dashboard_widget(‘CustomHelpWidget’, ‘Custom Help Dashboard’, ‘CustomDashboardHelp’); } function CustomDashboardHelp() {   echo ‘My First Custom Dashboard Widgets’; } Enjoy

Change WordPress Login Logo And Url

For Changing WordPress logo we have to override the default css of wordpress.for this we can use simple ‘login_enqueue_scripts’ hook Example: function ChangeLogo() { ?>   <style type=”text/css”>     .login h1 a {       background-image: url(<?php echo home_url();?&#62/wp-content/uploads/2020/01/logo.jpg) !important;       background-size: 100% !important;       float: left;       width: 100% !important;     }   </style> <?php } add_action( ‘login_enqueue_scripts’, ‘ChangeLogo’ ); For Changing Url …

Change WordPress Login Logo And Url Read More »

Remove wordpress menu and logo from admin panel

Using this Simple Hook We can easily remove wordpress logo and related sub menus to wordpress logo from admin panel bar of WordPress,You Just need to do is just copy this hook and paste below code on the function.php file of your theme. add_action(‘admin_bar_menu’, ‘remove_wordpress_logo’, 999); function remove_wordpress_logo( $admin_bar ) {   $admin_bar->remove_node(‘wp-logo’); } Enjoy

Add/Update Extra Product Meta Fields In Dokan

DOKAN is no doubt the best front end multi-vendor marketplace on WordPress, powered by WooCommerce.Dokan is the fastest way to start eCommerce and earn through commissions with products ranging from digital, physical to variable products. Some time we need to add some more information regarding product , for adding new fields to dokan form we …

Add/Update Extra Product Meta Fields In Dokan Read More »

Scroll to Top