View mysql-user-permission.txt
sudo chown -R _mysql:wheel /usr/local/mysql/data
sudo /usr/local/mysql/support-files/mysql.server restart
View generate_video_embed_url.php
* get youtube video ID from URL
* @param string $url
* @return string Youtube video id or FALSE if none found.
function youtube_id_from_url($url) {
$pattern =
'%^# Match any youtube URL
(?:https?://)? # Optional scheme. Either http or https
View Custom Search and Category Widgets WordPress
/* customer search form for widgets azizultex */
/* search form shortcode that populate tag automatically by tag page */
function searchFormByTag() {
View Get Categories by Tag
/* get categories related to tags */
function categoriesbytags_func() {
$tag = get_queried_object();
$args = array(
'tag' => $tag->slug,
View Custom Post Type URL Rewrite Made Easy!
You can rewrite custom post type links anyway you want following below code. I have completely replaced CPT slug with a custom metabox field for each post type.
/* Register Custom Post Type */
function viz360_project_post_type() {
View Override a plugin shortcode in WordPress
Best way to override a plugin function is to use mu-plugins (Must Use Plugins)
Aleternatively, follow below :
1. Copy the plugin shortcode function and put it anywhere in Child Theme and rename it like custom_cs_user_login_shortcode.
2. use 'wp_head' action to remove the plugin shortcode and register the new shortcode again with the new function name like custom_cs_user_login_shortcode.
View Ajax FrontEnd File Upload WordPress With Preview
Project: MySavingWallet
<dt><?php esc_html_e( 'Support Doc', 'listify_child' ); ?></dt>
View Google Map API for WordPress Site
function escaperoom_googlemap_api_key($url, $original_url, $_context) {
$key = 'AIzaSyAWQTIcIfpsttvugW18F1y14p8gbFXmtXE'; // your map api key
// If no key added no point in checking
if ( ! $key ) {
return $url;
if ( strstr( $url, "" ) !== false || strstr( $url, "" ) !== false ) {// it's a Google maps url
View Get WooCommerce Large Images list from Gallery
View Change slug ( add_rewrite_rule ) of already registered taxonomy or custom post type
USING add_rewrite_rule
/* azizultex