Skip to content

Instantly share code, notes, and snippets.

function repeater_tax_results($categories, $query) {
if ('kiujhhjkhjku' == $query->get('post_type')) {
$categories = array();
$category_query = new WP_Term_Query(array(
'taxonomy' => 'category', // Change 'category' to the taxonomy you want to query.
'hide_empty' => false,
'exclude' => get_cat_ID('Uncategorized'), // Exclude the 'Uncategorized' category
));
function repeater_users_results($users, $query) {
if ('anynon-commonname' == $query->get('post_type')) {
$users = array();
$user_query = new WP_User_Query(array(
'role' => '', // Blank All, Subscriber, Administrator .....
));
$user_results = $user_query->get_results();
{"component":{"id":14,"name":"ct_div_block","options":{"ct_id":14,"ct_parent":100002,"selector":"div_block-14-57","original":[],"nicename":"Div (#14)","classes":["x-header"],"activeselector":"x-header"},"depth":2,"children":[{"id":2,"name":"ct_code_block","options":{"ct_id":2,"ct_parent":14,"selector":"code_block-2-57","original":{"code-js":"document.addEventListener(\"DOMContentLoaded\", function () {\n\t\tif( window.angular ) return;\n\n function findAncestor(el) {\n return el.closest(\".x-nav\");\n }\n\n function removeSiblings(item) {\n const siblings = item.closest('.x-nav').querySelectorAll(\".x-mega\");\n siblings.forEach((sibling) => {\n if (sibling !== item) {\n sibling.classList.remove(\"x-active\");\n }\n });\n }\n\n function toggle(item) {\n item.classList.toggle(\"x-active\");\n removeSiblings(item);\n let parent = item.parentElement;\n while (parent && parent !== document) {\n if (parent.classList.contains('x-mega')) {\n parent.classList.
{"component":{"id":2,"name":"ct_section","options":{"ct_id":2,"ct_parent":100002,"selector":"section-2-41","original":{"min-height-unit":"vh","flex-direction":"row","display":"flex","align-items":"flex-start","justify-content":"center","min-height":"150","container-padding-top":"339"},"nicename":"Section (#2)","activeselector":false},"depth":2,"children":[{"id":3,"name":"ct_div_block","options":{"ct_id":3,"ct_parent":2,"selector":"div_block-3-41","original":{"width":"100","width-unit":"%"},"nicename":"Div (#3)","activeselector":false},"depth":3,"children":[{"id":4,"name":"ct_div_block","options":{"ct_id":4,"ct_parent":3,"selector":"div_block-4-41","original":{"useCustomTag":"true","tag":"select","custom-attributes":[{"name":"onchange","value":"if (this.value) window.location.href=this.value"}]},"nicename":"Div (#4)","activeselector":false},"depth":4,"children":[{"id":8,"name":"ct_text_block","options":{"ct_id":8,"ct_parent":4,"selector":"text_block-8-41","original":{"useCustomTag":"true","tag":"option","custo
{"component":{"id":2,"name":"ct_section","options":{"ct_id":2,"ct_parent":100017,"selector":"section-2-67","original":{"section-width":"full-width","container-padding-top":"0","container-padding-right":"0","container-padding-bottom":"0","container-padding-left":"0"},"nicename":"Section (#2)","activeselector":false,"media":{"phone-portrait":{"original":{"overflow":"hidden"}}}},"depth":3,"children":[{"id":46,"name":"ct_div_block","options":{"ct_id":46,"ct_parent":2,"selector":"div_block-46-67","original":{"width":"100","width-unit":"%","max-width":"100","max-width-unit":"%"},"nicename":"Slider"},"depth":4,"children":[{"id":47,"name":"ct_code_block","options":{"ct_id":47,"ct_parent":46,"selector":"code_block-47-67","original":{"code-js":"document.addEventListener('DOMContentLoaded', function() {\n\n\tconst delay = 5000; \n\tconst effect = \"slide\";\n\n\tfunction updateSliderBar() {\n\t\tconst sliderBar = document.querySelector('.c-slider-classic-bar');\n\t\tsliderBar.style.transition = `width 0ms linear`; \n\t\
{"component":{"id":9,"name":"ct_div_block","options":{"ct_id":9,"ct_parent":2,"selector":"div_block-9-18","original":{},"nicename":"Info Content","classes":["c-info-content"],"activeselector":"c-info-content"},"depth":4,"children":[{"id":3,"name":"ct_div_block","options":{"ct_id":3,"ct_parent":9,"selector":"div_block-3-18","original":{},"nicename":"Card Info","classes":["c-info"],"activeselector":"c-info"},"depth":5,"children":[{"id":18,"name":"ct_div_block","options":{"ct_id":18,"ct_parent":3,"selector":"div_block-18-18","original":{},"nicename":"Info Wrap","classes":["c-info-wrap"],"activeselector":"c-info-wrap"},"depth":6,"children":[{"id":4,"name":"ct_headline","options":{"ct_id":4,"ct_parent":18,"selector":"headline-4-18","original":{},"nicename":"Heading (#4)","ct_content":"Get The Dough<br>","classes":["c-info-title"],"activeselector":"c-info-title"},"depth":7},{"id":5,"name":"ct_text_block","options":{"ct_id":5,"ct_parent":18,"selector":"text_block-5-18","original":{},"nicename":"Text (#5)","ct_conten