All muhaza's note in developing website. Front-end & uiux method. Real life implementation for webdesigner.
Wednesday, 4 January 2023
ngFor
Thursday, 6 October 2022
SHORTCODE Content Base on User Role/ User Log in
[member_only]User is logged in.[/member_only]
Tuesday, 28 June 2022
ENABLE USER UPLOAD ZIP
Add this on functions.php
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {
// add your extension to the mimes array as below
$existing_mimes['zip'] = 'application/zip';
$existing_mimes['gz'] = 'application/x-gzip';
return $existing_mimes;
}
Thursday, 14 April 2022
WP PLUGIN DEVELOPMENT
- Looking method to get data from wp-mysql
- create form to adjust wp-mysql from admin side
- connect with woocommerce
Tuesday, 12 April 2022
CUSTOM ADMIN DASHBOARD WIDGET SCREEN OPTIONS
add_action(
'wp_dashboard_setup'
,
'my_custom_dashboard_widgets'
);
function
my_custom_dashboard_widgets() {
global
$wp_meta_boxes
;
wp_add_dashboard_widget(
'custom_help_widget'
,
'Theme Support'
,
'custom_dashboard_help'
);
}
function
custom_dashboard_help() {
echo
'<p>Welcome to Custom Blog Theme! Need help? Contact the developer <a href="mailto:yourusername@gmail.com">here</a>. For WordPress Tutorials visit: <a href="https://www.wpbeginner.com" target="_blank">WPBeginner</a></p>'
;
}
WP FUNCTIONS.PHP TO THE WORDPRESS PLUGIN
1. You need file manager. Download it on plugin
2. Create new folder name it anything 'my-functions'
3. Create new php file name it 'my-functions.php'
4. paste and edit code below suit with your want
<?php
/*
Plugin Name: my functions
Plugin URI: https://orkedtouch.com/wp-admin/plugin-editor.php
Description: This is my functions instead on functions.php
Author: MUHAZA
Author URI:
Version: 2022.04.13
License: GPL
*/
// add your functions below
Saturday, 9 April 2022
Fonts with specific Media Query
<link rel="stylesheet" href="styles.css" media="only screen and (max-device-width: 480px)">
<link rel="stylesheet" href="styles_mobile.css" media="only screen and (min-device-width: 480px)">Friday, 8 April 2022
HTACCESS SPEED UP OPTIMIZE SETUP
WOOCOMMERCE FLYCART
Wednesday, 23 February 2022
BASIC DHTML FRONT-END USE
Sunday, 14 November 2021
PHONE NUMBER OR EMAIL NOT REQUIRED
// For billing email and phone - Make them not required
add_filter( 'woocommerce_billing_fields', 'filter_billing_fields', 20, 1 );
function filter_billing_fields( $billing_fields ) {
// Only on checkout page
if( ! is_checkout() ) return $billing_fields;
$billing_fields['billing_phone']['required'] = false;
$billing_fields['billing_email']['required'] = false;
return $billing_fields;
}
Sunday, 7 November 2021
WP Snippet
To add code to your header, use this code snippet:
/* Describe what the code snippet does so you can remember later on */
add_action('wp_head', 'your_function_name');
function your_function_name(){
?>
PASTE HEADER CODE HERE
<?php
};
To add code to your footer, use this code snippet:
/* Describe what the code snippet does so you can remember later on */
add_action('wp_footer', 'your_function_name');
function your_function_name(){
?>
PASTE FOOTER CODE HERE
<?php
};
For each snippet, make sure to change:
- The comment description (helpful when you need to remember what a code snippet does a year later)
- The your_function_name placeholder (both instances)
- The PASTE X CODE HERE placeholder
Step 2: Add Code Snippets to functions.php File in Child Theme
Once you have the relevant code snippet(s) ready, you need to add them to the functions.php file of your child theme. You can either edit this file by connecting to your site via FTP. Or, you can go to Appearance → Editor and select the functions.php file. Then, paste your code at the end of the file:

Add code to functions.php file
Make sure to save your changes and you’re done!
BONUS: Add Code to Header or Footer For Only Specific Pages
If you want more control over where your header or footer code snippets show up, you can use if statements to only add the code to specific pages on your WordPress site.
For example, to only add code snippets to the header or footer of your homepage, you could use:
/* Describe what the code snippet does so you can remember later on */
add_action('wp_head', 'your_function_name');
function your_function_name(){
if(is_front_page()) { ?>
PASTE HEADER CODE HERE
<?php }
};
Another option is to only add the code snippets to specific posts or pages. To do that, you can use this code snippet:
/* Describe what the code snippet does so you can remember later on */
add_action('wp_head', 'your_function_name');
function your_function_name(){
if(is_single(73790)) { ?>
PASTE HEADER CODE HERE
<?php }
};
Make sure to replace the example number – 73790 – with the actual ID of the post or page you want to add the code snippets to.
Saturday, 1 May 2021
CHANGE WORDPRESS@ EMAIL DEFAULT TO CUSTOM
// Change default WordPress email address
Submit RSSa
rssing.com
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 < div style = "background-color:#D94A38;width:170px;height:80px;ma...
-
//editable cookies enable $( function (){ var liveEdit = document .getElementById( 'live-edit' ); $(liveEdit).blur( f...