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
/*Paste this code into a plugin like Code Snippets or the one of your choice */ | |
function oxy_call_id_quickview() { | |
if (isset($_GET['quickterm']) && !empty($_GET['quickterm'])) { | |
return sanitize_text_field($_GET['quickterm']); | |
} else { | |
$args = array( | |
'post_type' => 'product', | |
'posts_per_page' => 1, | |
'orderby' => 'date', | |
'order' => 'ASC' |
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
//JSON OXYGEN BUILDER | |
{"component":{"id":216,"name":"ct_div_block","options":{"ct_id":216,"ct_parent":100004,"selector":"div_block-216-53","original":{"padding-bottom":"0"},"nicename":"Wishlist Elements","activeselector":false},"depth":5,"children":[{"id":217,"name":"ct_code_block","options":{"ct_id":217,"ct_parent":216,"selector":"code_block-217-53","nicename":"Code Wishlist Paste Global","activeselector":false,"original":{"code-php":"<script>\n\ndocument.addEventListener('DOMContentLoaded', function() {\n if (window.angular) return;\n assignButtonEvents();\n\n function assignButtonEvents() {\n const wishlistButtons = document.querySelectorAll('.oxy-add-to-wishlist, .oxy-remove-from-wishlist');\n\n wishlistButtons.forEach(button => {\n button.removeEventListener('click', handleWishlistButtonClick);\n button.addEventListener('click', handleWishlistButtonClick);\n });\n }\n\n function handleWishlistButtonClick(event) {\n const button = event.cur |
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
{"component":{"id":2,"name":"ct_section","options":{"ct_id":2,"ct_parent":0,"selector":"section-2-57","original":[],"nicename":"Element Count Section"},"depth":1,"children":[{"id":57,"name":"ct_div_block","options":{"ct_id":57,"ct_parent":2,"selector":"div_block-57-57","original":[],"nicename":"Element Count","classes":["full-width","is-center"],"activeselector":"is-center"},"depth":2,"children":[{"id":58,"name":"ct_code_block","options":{"ct_id":58,"ct_parent":57,"selector":"code_block-58-57","original":{"code-js":"function counter() {\n\n \tif( window.angular ) return;\n \n var xCountElements = document.querySelectorAll('.x-count');\n xCountElements.forEach(function(element) {\n if (element.classList.contains('x-start')) {\n var elementTop = element.offsetTop;\n var elementHeight = element.offsetHeight;\n var elementBottom = elementTop + elementHeight;\n var viewportTop = window.pageYOffset || document.documentElement.scrollTop;\n var vie |
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
{"component":{"id":500,"name":"ct_div_block","options":{"ct_id":500,"ct_parent":100004,"selector":"div_block-500-72","original":[],"nicename":"Element Countdown"},"depth":5,"children":[{"id":520,"name":"ct_code_block","options":{"ct_id":520,"ct_parent":500,"selector":"code_block-520-72","original":{"code-js":"function updateTimers() {\n if (window.angular) return;\n\n var now = new Date();\n var containers = document.querySelectorAll(\".x-count\");\n\n containers.forEach(function(container) {\n var future = new Date(\n container.getAttribute(\"data-count-year\"),\n parseInt(container.getAttribute(\"data-count-mo\")) - 1,\n parseInt(container.getAttribute(\"data-count-day\")) + 0\n );\n\n var diff = future - now;\n\n var days = Math.floor(diff / (1000 * 60 * 60 * 24));\n var hours = Math.floor(diff / (1000 * 60 * 60)) % 24;\n var mins = Math.floor(diff / (1000 * 60)) % 60;\n var secs = Math.floor(diff / 1000) % 60;\n\n var daysElement = container.querySelector(\".x-co |
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 woo_field($property) { | |
$date_format = 'd - M - Y'; // Format Date | |
$info = null; | |
if (!in_array($property, ['cart_product_ids', 'cart_total_items', 'cart_total_price'])) { | |
global $product; | |
if (!$product) { | |
$product = wc_get_product(get_the_ID()); | |
} |
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
/* | |
With the repeater it is possible to create a custom search with the parameter "s" by calling the get_search_query() function | |
*/ | |
/*JSON*/ | |
{"component":{"id":600,"name":"ct_section","options":{"ct_id":600,"ct_parent":100002,"selector":"section-600-175","original":{"gap":"40"},"nicename":"Section (#600)"},"depth":2,"children":[{"id":601,"name":"ct_div_block","options":{"ct_id":601,"ct_parent":600,"selector":"div_block-601-175","original":{"custom-attributes":[{"name":"role","value":"search"},{"name":"method","value":"get"},{"name":"action","value":"[oxygen ct_sign_sha256='a7176e6d23c64a39215894746856cbaf4639cf740ff9d1f796183deb6c5e34d0' data='phpfunction' function='home_url' ]"}],"useCustomTag":"true","tag":"form"},"nicename":"Search FORM","classes":["x-search"],"activeselector":"x-search"},"depth":3,"children":[{"id":602,"name":"ct_div_block","options":{"ct_id":602,"ct_parent":601,"selector":"div_block-602-175","original":[],"nicename":"Search Content","classes":["x-search__content"],"activeselector":false} |
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
{"component":{"id":462,"name":"ct_section","options":{"ct_id":462,"ct_parent":100002,"selector":"section-462-175","original":{"custom-attributes":[[]],"gap":"40"},"nicename":"Section (#462)","activeselector":""},"depth":2,"children":[{"id":463,"name":"ct_div_block","options":{"ct_id":463,"ct_parent":462,"selector":"div_block-463-175","original":{},"nicename":"Pagination A"},"depth":3,"children":[{"id":464,"name":"ct_div_block","options":{"ct_id":464,"ct_parent":463,"selector":"div_block-464-175","original":{"conditionspreview":"2","globalConditionsResult":true},"nicename":"CLASS COPY DELETE","classes":["x-pagination__numbers"],"activeselector":"x-pagination__numbers"},"depth":4,"children":[{"id":465,"name":"ct_text_block","options":{"ct_id":465,"ct_parent":464,"selector":"text_block-465-175","original":[],"nicename":"Text (#275)","classes":["x-pagination__number","x-pagination__number--current"],"activeselector":"x-pagination__number","ct_content":"1"},"depth":5},{"id":466,"name":"ct_text_block","options":{"c |
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
//*******Lightbox***********/ | |
function load_glightbox_scripts() { | |
if (!is_admin()) { | |
wp_enqueue_style('glightbox-css', 'https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css'); | |
wp_enqueue_script('glightbox-js', 'https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js', array('jquery'), null, true); | |
} | |
} | |
add_action('wp_enqueue_scripts', 'load_glightbox_scripts'); |
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 load_splide_scripts() { | |
wp_register_script('splide-js', 'https://cdn.jsdelivr.net/npm/@splidejs/[email protected]/dist/js/splide.min.js', array(), '4.1.4', true); | |
wp_register_style('splide-css', 'https://cdn.jsdelivr.net/npm/@splidejs/[email protected]/dist/css/splide.min.css', array(), '4.1.4'); | |
if (is_front_page()) { | |
wp_enqueue_script('splide-js'); | |
wp_enqueue_style('splide-css'); | |
} | |
} | |
add_action('wp_enqueue_scripts', 'load_splide_scripts'); |