This file contains hidden or 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 | |
| $product_categories = array('cat-name'); | |
| $wc_query = new WP_Query(array( | |
| 'post_type' => 'product', | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => 10, | |
| 'tax_query' => array(array( | |
| 'taxonomy' => 'product_cat', |
This file contains hidden or 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
| // Get Product ID | |
| $product->get_id(); (fixes the error: "Notice: id was called incorrectly. Product properties should not be accessed directly") | |
| // Get Product General Info | |
| $product->get_type(); | |
| $product->get_name(); | |
| $product->get_slug(); | |
| $product->get_date_created(); |
This file contains hidden or 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 | |
| // $acf_field = get_field('acf_field'); | |
| // FROM SAME CATEGORY | |
| // $categories = get_the_category(); | |
| // postid = get_the_ID(); | |
| $query = new WP_Query(array( | |
| 'post_type' => 'post', | |
| 'posts_per_page' => 1, |
This file contains hidden or 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 ($) { | |
| var app = function () { | |
| this.body = $('body'); | |
| //CREATE FUNCTIONS FOR THE SITE | |
| var mapController = function () { | |
| var map = L.map('map').setView([-22.760733, -41.890303], 15); |
This file contains hidden or 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
| var pageTransition = function () { | |
| var FadeTransition = Barba.BaseTransition.extend({ | |
| start: function () { | |
| Promise | |
| .all([this.newContainerLoading, this.fadeOut()]) | |
| .then(this.fadeIn.bind(this)); | |
| }, | |
| fadeOut: function () { |
This file contains hidden or 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 wp_options | |
| SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') | |
| WHERE option_name = 'home' | |
| OR option_name = 'siteurl'; | |
| UPDATE wp_posts | |
| SET guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com'); | |
| UPDATE wp_posts | |
| SET guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com'); |