Month: April 2020

How to make use of digital resources for making a difference in the struggle against COVID-19

Facing a crisis is tough even when it is to be dealt with on a small scale. If one intends on coming out of such a situation, unscathed and unharmed, then one thing is just about obvious. This individual needs to be open to all sorts of help that comes their way. If a person …

How to make use of digital resources for making a difference in the struggle against COVID-19 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

WooCommerce : Dynamic Pricing According To Quantity

Sometimes we need dynamic price according to user of according to quantity or other conditions. we can simply use ‘woocommerce_before_calculate_totals’ hook. Example: Suppose we want product price according to quantity . function QuantityBasedPricing( $cart ) {     if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ) return;     if ( did_action( ‘woocommerce_before_calculate_totals’ ) >= 2 ) return; …

WooCommerce : Dynamic Pricing According To Quantity Read More »

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 »

WordPress Shortcode

Since Version 2.5 WordPress supports so called ‘Shortcodes’.Example:[audio] Shortcodes can also be used with attributes as the following example shows:Example:[audio id=”123″] WordPress have some of the shortcodes by default (for example the audio one). The following shortcodes are included with WordPress: [audio] [caption] [embed] [gallery] [playlist] [video] Shortcodes are of both type singular and paired. …

WordPress Shortcode Read More »

WooCommerce : How to change the number of products on shop page in woocommerce

WooCommerce is one of the most powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there’s an API for nearly everything.There are almost Hooks and filters For Every Customization work. In order to change the number of products per page on shop page, you have to use ‘loop_shop_per_page’ hook. In our example, …

WooCommerce : How to change the number of products on shop page in woocommerce Read More »

Scroll to Top