This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First switch to database | |
USE db_name; | |
# replace file name with full file path. | |
SET autocommit=0; source the_sql_file.sql; COMMIT ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; the maximum time in seconds a script is allowed to run before it is terminated by the parser | |
max_execution_time = 300 | |
; the maximum amount of memory in bytes that a script is allowed to allocate. | |
; Suggested: 256 MB or greater | |
memory_limit = 128M | |
; How many input variables may be accepted | |
max_input_vars = 4000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
# Point your wordpress project directory. in our case it is (/var/www/wordpress.test) | |
root /var/www/wordpress.test; | |
index index.php; | |
# Give virtual host domain name | |
server_name wordpress.test www.wordpress.test; | |
location = /favicon.ico { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Elementor\Plugin; | |
use Elementor\Widget_Base; | |
class Shapla_Hero_Slider extends Widget_Base { | |
/** | |
* Retrieve the name. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! class_exists('Validate') ) { | |
class Validate { | |
/** | |
* Check if the value is present. | |
* | |
* @param mixed $value | |
* @return boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Add custom fee to cart automatically | |
* | |
*/ | |
function woo_add_cart_fee() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Display variations dropdowns on shop page for variable products | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
function woo_display_variation_dropdown_on_shop_page() { | |
global $product; | |
if( $product->is_type( 'variable' )) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Place this in your functions.php file in your theme folder. | |
remove_theme_support( 'wc-product-gallery-lightbox' ); |
NewerOlder