View functions.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
<?php | |
$args = array( | |
'taxonomy' => 'product_cat', // truyền category/custom taxonomy name vào đây. | |
'parent' => get_queried_object_id(), | |
); | |
$getterms = get_terms( $args ); |
View .htaccess
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
# Hướng dẫn tại: https://namncn.com/chua-phan-loai/huong-dan-chuyen-huong-htaccess-redirect-301-ten-mien-cu-sang-ten-mien-moi/ | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^tenmiencu.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www.tenmiencu.com$ | |
RewriteRule ^(.*)$ https://tenmienmoi.com/$1 [R=301,L] |
View webhooks-elementor-forms-to-google-spreadsheets.js
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
/* | |
* In order to enable this script, follow these steps: | |
*** Open the Google Sheet you want to use, | |
** From the Tools menu select "Script Editor" | |
* Paste this script into code editor and hit Save. | |
* | |
*** Then click: | |
** "Publish" & select "Deploy as web app... | |
*** Select: | |
** Execute the app as: Me (youremail@gmail.com) |
View Index.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
<?php | |
- /license/api.php: 28 | |
private static function remote_post( $body_args = [] ) { | |
return array( | |
'success' => true, | |
'license' => 'valid', | |
'item_id' => false, | |
'item_name' => 'Elementor Pro', | |
'checksum' => 'd18890f8c194876c54e58d2f221e5332', |
View How to Fix Could not get lock Error on Ubuntu
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
How to Fix Could not get lock /var/lib/dpkg/lock Error on UbuntuHow to Fix Could not get lock /var/lib/dpkg/lock Error on Ubuntu | |
sudo kill -9 8808 | |
sudo dpkg --configure -a |
View remove-category-or-custom-taxonomy-slugs-from-url.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
<?php | |
/** | |
* Change Term Request. | |
*/ | |
function pixelplus_change_term_request( $query ) { | |
$tax_name = 'product_cat'; // specify you taxonomy name here, it can be also 'category' or 'post_tag' | |
// Request for child terms differs, we should make an additional check | |
if ( $query['attachment'] ) : |
View allow-svg-upload-in-wordpress-media.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
<?php | |
/** | |
* Add svg support | |
* | |
*/ | |
add_filter( 'wp_check_filetype_and_ext', function( $data, $file, $filename, $mimes) { | |
global $wp_version; | |
if( $wp_version == '4.7' || ( (float) $wp_version < 4.7 ) ) { | |
return $data; | |
} |
View img-responsive.css
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
<div class="post-thumb"> | |
<img src="https://i.imgur.com/iCMEVjr.jpg" alt="Norway"> | |
</div> | |
.post-thumb { | |
position: relative; | |
height:0; | |
padding-bottom: 56.25%; // Điền % bạn cần. | |
} |
View project-carousel.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
<?php | |
namespace Pixelplus\Elementor\Widget; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
use Elementor\Widget_Base; | |
use Elementor\Controls_Manager; |
View WooCommerce: woocommerce.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
<?php | |
function pixelplus_add_woo_custom_general_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
woocommerce_wp_checkbox( | |
array( | |
'id' => '_hot_product', | |
'label' => __( 'Sản phẩm Hot?', 'pixelplus' ), |
NewerOlder