Skip to content

Instantly share code, notes, and snippets.

View abid112's full-sized avatar
🎯
Focusing

Abid Hasan abid112

🎯
Focusing
View GitHub Profile
@abid112
abid112 / functions.php
Created August 3, 2021 13:08
Click instead of hover to open Elementor Pro (Nav Menu widget) submenu
//Here is the full video: https://youtu.be/F2dFOSIivRA
//Dequeue Elementor Pro smartmenus script
function elementor_pro_dequeue_script(){
wp_dequeue_script('smartmenus');
}
add_action('wp_footer', 'elementor_pro_dequeue_script', 15);
@gemmadlou
gemmadlou / remove-visual-composer-shortcodes.md
Last active October 16, 2024 00:28
Removing Visual Composer & Shortcodes From Wordpress Content

Adding @k1sul1's suggestion from the comments as it's more concise than what I had before:

I just wanted them all gone, so I ran this in the MySQL shell.

UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[\/?vc(.*?)\]", "");

Note the double backslash. If you forget it, you'll replace all v's and c's with nothing, and the shortcodes will still be there. This works for other shortcode as well, just replace vc.

@macbleser
macbleser / wp-permissions-script
Created February 21, 2014 15:37
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory