Skip to content

Instantly share code, notes, and snippets.

@jamesmthornton
Created December 19, 2022 19:51
Show Gist options
  • Save jamesmthornton/0cbc427b93031b96b26a64c724c9a3e3 to your computer and use it in GitHub Desktop.
Save jamesmthornton/0cbc427b93031b96b26a64c724c9a3e3 to your computer and use it in GitHub Desktop.
FacetWP Troubleshooting 12-19-2022
{
"query_args": {
"post_type": [
"post"
],
"post_status": [
"publish",
"acf-disabled"
],
"author": "2",
"error": "",
"m": "",
"p": 0,
"post_parent": "",
"subpost": "",
"subpost_id": "",
"attachment": "",
"attachment_id": 0,
"name": "",
"pagename": "",
"page_id": 0,
"second": "",
"minute": "",
"hour": "",
"day": 0,
"monthnum": 0,
"year": 0,
"w": 0,
"category_name": "",
"tag": "",
"cat": "",
"tag_id": "",
"author_name": "",
"feed": "",
"tb": "",
"paged": 1,
"meta_key": "",
"meta_value": "",
"preview": "",
"s": null,
"sentence": "",
"title": "",
"fields": "",
"menu_order": "",
"embed": "",
"category__in": [],
"category__not_in": [],
"category__and": [],
"post__in": [],
"post__not_in": [],
"post_name__in": [],
"tag__in": [],
"tag__not_in": [],
"tag__and": [],
"tag_slug__in": [],
"tag_slug__and": [],
"post_parent__in": [],
"post_parent__not_in": [],
"author__in": [],
"author__not_in": [],
"facetwp": true,
"posts_per_page": 10
},
"sql": "\n\t\t\tSELECT SQL_CALC_FOUND_ROWS wp_posts.*\n\t\t\tFROM wp_posts \n\t\t\tWHERE 1=1 AND wp_posts.post_author IN (2) AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled'))\n\t\t\t\n\t\t\tORDER BY wp_posts.post_date DESC\n\t\t\tLIMIT 0, 10\n\t\t",
"facets": {
"case_study_services": {
"name": "case_study_services",
"label": "Case Study Services",
"type": "radio",
"source": "tax/services",
"label_any": "Any",
"parent_term": "",
"modifier_type": "off",
"modifier_values": "",
"ghosts": "yes",
"preserve_ghosts": "no",
"orderby": "count",
"count": "10",
"operator": "or",
"selected_values": []
}
},
"template": {
"name": "case_study_template",
"label": "Case Study Template",
"query": "<?php\nreturn [\n \"post_type\" => [\n \"cases\"\n ],\n \"post_status\" => [\n \"publish\"\n ],\n \"facetwp\" => [\n \"true\"\n ],\n \"orderby\" => [\n \"date\" => \"DESC\"\n ],\n \"posts_per_page\" => 18\n];",
"template": "<?php if ( have_posts() ) : $i = 0; echo '<div class=\"wp-block-columns equal-height\" style=\"margin-bottom: 10px;\">'; ?>\n <?php while ( have_posts() ): the_post(); $i++; ?>\n\n<div class=\"wp-block-column\" style=\"padding: 10px;\">\n <!-- wp:cover {\"url\":\"/wp-content/uploads/2022/07/IMG_1088-scaled.jpeg\",\"id\":2800,\"dimRatio\":70,\"overlayColor\":\"theme-palette4\",\"minHeight\":200} -->\n <div class=\"wp-block-cover\" style=\"min-height:200px\">\n <a href=\"<?php the_permalink(); ?>\">\n <span aria-hidden=\"true\" class=\"wp-block-cover__background has-theme-palette-4-background-color has-background-dim-70 has-background-dim\"></span>\n <img class=\"wp-block-cover__image-background wp-image-2800\" alt=\"\"\n src=\"/wp-content/uploads/2022/07/IMG_1088-scaled.jpeg\" data-object-fit=\"cover\" />\n <div class=\"wp-block-cover__inner-container\">\n <!-- wp:spacer {\"height\":\"15px\"} -->\n <div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n <!-- /wp:spacer -->\n <!-- wp:heading {\"textAlign\":\"center\",\"level\":3,\"textColor\":\"theme-palette9\"} -->\n <h3 class=\"has-text-align-center has-theme-palette-9-color has-text-color\"><?php the_field('client_name'); ?></h3>\n <!-- /wp:heading -->\n <!-- wp:spacer {\"height\":\"25px\"} -->\n <div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n <!-- /wp:spacer -->\n <!-- wp:heading {\"textAlign\":\"center\",\"level\":1,\"textColor\":\"theme-palette9\"} -->\n <h1 class=\"has-text-align-center has-theme-palette-9-color has-text-color\" style=\"margin-top: 0;\"><?php the_title(); ?></h1>\n <!-- /wp:heading -->\n <!-- wp:spacer {\"height\":\"25px\"} -->\n <div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n <!-- /wp:spacer -->\n <!-- wp:buttons {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"}} -->\n <div class=\"wp-block-buttons has-text-align-center\">\n <!-- wp:button -->\n <div class=\"wp-block-button\">\n <a class=\"wp-block-button__link\" href=\"<?php the_permalink(); ?>\">Read Case</a>\n </div>\n <!-- /wp:button -->\n </div>\n <!-- /wp:buttons -->\n <!-- wp:spacer {\"height\":\"15px\"} -->\n <div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n <!-- /wp:spacer -->\n </div>\n </a>\n </div>\n <!-- /wp:cover -->\n</div><?php\nif ( $i % 3 == 0 ) {\necho '</div><div class=\"wp-block-columns equal-height\">';\n\n}?>\n <?php endwhile;\n \n echo '</div>';\n ?>\n<?php else : ?>\n <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>\n<?php endif; ?>\n<script>\n(function($) {\n document.addEventListener('facetwp-loaded', function() {\n jQuery( window ).trigger( 'equalheights' );\n });\n})(jQuery);\n</script>\n<style>\n.wp-block-columns .wp-block-column .wp-block-cover a {\n text-decoration: none;\n}\n.wp-block-columns .wp-block-column .wp-block-cover a h1 {\n text-decoration: underline;\n text-decoration-color: var(--global-palette-btn-bg);\n}\n.wp-block-columns .wp-block-column .wp-block-cover a h3 {\n color: var(--global-palette-btn-bg);\n text-transform: uppercase;\n letter-spacing: 1px;\n line-height: 1.2;\n font-size: 21px;\n}\n\n</style>\n",
"layout": {
"items": [
{
"type": "row",
"items": [
{
"type": "col",
"items": [
{
"type": "item",
"source": "featured_image",
"settings": {
"image_size": "medium_large",
"link": {
"type": "post",
"href": "",
"target": ""
},
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-fidjzm7",
"css_class": "",
"is_hidden": ""
}
},
{
"type": "item",
"source": "post_title",
"settings": {
"link": {
"type": "post",
"href": "",
"target": ""
},
"prefix": "",
"suffix": "",
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 16
},
"name": "el-05opc",
"css_class": "case-study",
"is_hidden": ""
}
},
{
"type": "item",
"source": "acf/field_62dff72be9020",
"settings": {
"prefix": "",
"suffix": "",
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-7ua1v4",
"css_class": "",
"is_hidden": ""
}
},
{
"type": "item",
"source": "acf/field_62018acfc1110",
"settings": {
"prefix": "",
"suffix": "",
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-n78rh",
"css_class": "",
"is_hidden": ""
}
}
],
"settings": {
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-lj0n3a",
"css_class": ""
}
}
],
"settings": {
"grid_template_columns": "1fr",
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 20,
"bottom": 20,
"left": 20
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-q5yfcf",
"css_class": ""
}
},
{
"type": "row",
"items": [
{
"type": "col",
"items": [],
"settings": {
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-89rnu",
"css_class": ""
}
}
],
"settings": {
"grid_template_columns": "1fr",
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-huzet",
"css_class": ""
}
}
],
"settings": {
"num_columns": 3,
"grid_gap": 10,
"border": {
"style": "none",
"color": "",
"width": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"background_color": "",
"padding": {
"unit": "px",
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"text_color": "",
"text_style": {
"align": "",
"bold": false,
"italic": false
},
"font_size": {
"unit": "px",
"size": 0
},
"name": "el-woiqq",
"css_class": "",
"custom_css": ""
}
},
"query_obj": {
"post_type": [
{
"label": "Case Studies",
"value": "cases"
}
],
"posts_per_page": 18,
"orderby": [
{
"key": "date",
"order": "DESC",
"type": "CHAR"
}
],
"filters": []
},
"modes": {
"display": "advanced",
"query": "advanced"
}
},
"settings": {
"thousands_separator": ",",
"decimal_separator": ".",
"prefix": "_",
"load_jquery": "no",
"debug_mode": "on"
},
"last_indexed": "22 hours",
"row_counts": {
"case_study_services": 8,
"categories": 1563,
"marketing_category": 30,
"new_facet": 662,
"tags": 1108
},
"hooks_used": {
"pre_get_posts": [
"wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php:225",
"wp-content/plugins/project-huddle/includes/admin/post-type-ui.php:189",
"wp-content/plugins/project-huddle/includes/admin/post-type-ui.php:208",
"wp-content/plugins/project-huddle/includes/ph-permission-functions.php:182",
"wp-content/plugins/project-huddle/includes/ph-permission-functions.php:216",
"wp-content/plugins/acf-extended/includes/modules/post-types.php:291",
"wp-content/plugins/acf-extended/includes/modules/post-types.php:336",
"wp-content/plugins/acf-extended/includes/modules/taxonomies.php:373",
"wp-content/plugins/acf-extended/includes/modules/options-pages.php:374"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment