Skip to content

Instantly share code, notes, and snippets.

View majeedraza1's full-sized avatar
🎯
Focusing

Majeed Raza majeedraza1

🎯
Focusing
View GitHub Profile
# update the Apt cache and upgrade the current packages of system
sudo apt update && sudo apt upgrade
# nstall few dependencies required
sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https
# Add the Ondrej PPA
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
@majeedraza1
majeedraza1 / remove-yoast-seo-metabox-from-a-custom-post-type.php
Created December 19, 2022 02:47
Remove Yoast SEO metabox from a custom post type.
function remove_yoast_meta_boxes( $post_type ) {
$custom_post_type= 'movies'; // Replace this with your actual post type name.
if ( $custom_post_type === $post_type ) {
// remove Yoast SEO metaboxes if present.
remove_meta_box( 'wpseo_meta', $post_type, 'normal' );
remove_meta_box( 'yoast_internal_linking', $post_type, 'side' );
}
}
add_action( 'add_meta_boxes', 'remove_yoast_meta_boxes', 90 );
// Remember to give priority a higher number. e.g. 90 or more bigger
# First switch to database
USE db_name;
# replace file name with full file path.
SET autocommit=0; source the_sql_file.sql; COMMIT ;