Query Forge Documentation
Complete guide to using Query Forge — the visual node-based logic engine for Elementor.
What is Query Forge?
Query Forge is a visual query builder for Elementor that replaces the standard dropdown-based query interface with a node-based canvas. You connect Source, Filter, Logic, Sort, and Target nodes with lines to describe what you want to fetch and how — without writing any code.
The Free version is a fully functional static query builder. Pro adds dynamic context tags, advanced operators, additional source types, and multi-source queries.
Core Concepts
Every query is a directed graph. Logic always flows left to right: Source → (optional nodes) → Target. The canvas is the query.
- Source Node — defines what you are fetching (Posts, a Custom Post Type, Users, etc.)
- Filter Nodes — narrow the results (category is "News", meta field "featured" equals "yes")
- Logic Nodes — combine multiple filters with AND or OR
- Sort Nodes — define the order of results
- Include/Exclude Node — pin specific IDs in or out
- Target Node — defines output settings (posts per page, fallback sort order)
Free vs Pro
The Free version supports: Posts, Pages, and Custom Post Types as sources; Filter nodes with basic operators (=, !=, LIKE, NOT LIKE); Logic, Sort, Include/Exclude, and Target nodes; Save & Reuse; and standard pagination. AJAX, Load More, and Infinite Scroll pagination are Pro only. The Preview node and Source Preview are also Pro only.
Pro adds: Dynamic context tags; advanced operators (>, >=, <, <=, EXISTS, NOT EXISTS); multiple Source nodes per canvas with independent filter chains; Users, Comments, SQL Tables, and REST API sources; mixed queries; Visual SQL Joins; sort by meta value, random, and menu order; plugin integrations; and the Preview node for live canvas results.
Installation
Free Version
- Install Query Forge from the WordPress plugin directory
- Activate the plugin
- Ensure Elementor is installed and activated
Pro Version
- Download the Pro plugin zip from your purchase confirmation email
- Go to Plugins → Add New → Upload Plugin
- Upload the zip file and activate
- Go to Settings → Query Forge License
- Enter your license key and click ACTIVATE
Adding a Query Forge Widget to a Page
- Open any page in the Elementor editor
- Search for "Query Forge" in the widget panel
- Drag the widget onto your page
- Click ⚡ Open Builder to open the visual canvas
- Build your query, then click Save Logic
Your First Query
Example: Latest 10 Posts
- Open the Query Builder from the widget settings
- A Source node and Target node are already on the canvas by default
- Click the Source node and confirm it is set to Posts
- Click the Target node and set Posts Per Page to
10, Order By todate, Order toDESC - Connect the Source node's right handle to the Target node's left handle by dragging
- Click Save Logic
Result: Your 10 most recent published posts, newest first.
From here you can add Filter nodes between Source and Target to narrow results, Logic nodes to combine multiple filters, and Sort nodes for custom ordering.
Widget Settings
Once you have added the Query Forge widget to a page in Elementor, the widget panel on the left contains four sections of settings that control how results are displayed. These settings are separate from the query logic — the query defines what to fetch, the widget settings define how to show it.
Query Builder
Contains a single button: ⚡ Open Builder. Click it to open the visual query canvas. The compiled query logic is stored invisibly in this section after you save.
Layout
Controls the grid structure that wraps all result cards.
| Setting | Options | Default |
|---|---|---|
| Columns | 1 – 6 | 3 desktop / 2 tablet / 1 mobile |
| Column Gap | 0 – 100px | 20px |
| Row Gap | 0 – 100px | 20px |
Columns is a responsive control — you can set different values for desktop, tablet, and mobile independently using the device switcher in the Elementor panel.
Card Style
Controls which card layout is used to render each result. Choose from five built-in styles:
| Style | Description |
|---|---|
| Vertical Card | Image on top, content below. The default. Good for standard blog grids. |
| Horizontal Card | Image on the left, content on the right. Good for list-style layouts. |
| Minimal List | Title and meta only, no image. Good for dense content lists. |
| Grid Card | Image-dominant card with overlay text. Good for visual galleries. |
| Magazine Style | Mixed-size cards suitable for editorial layouts. |
Custom Elementor Template Requires Elementor Pro
Uses an Elementor Loop Item template as the card layout, giving you full design control over each result item. This requires Elementor Pro — Loop Item templates are part of Elementor's Theme Builder which is not available in Elementor Free. This option is available in both Query Forge Free and Query Forge Pro, but will only function if Elementor Pro is installed and active.
- In Elementor Pro, go to Templates → Theme Builder → Loop Item and create a new template
- Design the template as you want each card to look, using Elementor's dynamic tags to pull in post data
- Publish the Loop Item template
- In the Query Forge widget, set Display Type to Custom Elementor Template
- Select your template from the dropdown
Content Fields
Controls which fields appear on each card. Only visible when using a canned style.
| Setting | Options |
|---|---|
| Show Title | On / Off |
| Show Excerpt | On / Off |
| Excerpt Length | 10 – 500 characters (shown when Excerpt is on) |
| Show Date | On / Off |
| Show Author | On / Off |
| Show Featured Image | On / Off |
| Image Size | Thumbnail / Medium / Large / Full (shown when Image is on) |
| Link Target | Same Window / New Window |
| Show Read More Button | On / Off |
| Button Position | Top / Bottom (shown when Read More is on) |
Card Design
Controls the visual appearance of canned card layouts. Available in both Free and Pro. All controls are in the Content tab and only appear when a canned style is selected. Typography and alignment controls are conditional — they only appear when the corresponding field is enabled in Content Fields.
Typography
| Control | Targets | Condition |
|---|---|---|
| Title Typography | .qf-card-title | Show Title is on |
| Excerpt Typography | .qf-card-excerpt | Show Excerpt is on |
| Meta Typography | .qf-card-meta | Always shown |
| Button Typography | .qf-card-button | Show Read More is on |
Element Alignment
Per-element text alignment. All controls are responsive — you can set different values for desktop, tablet, and mobile.
| Control | Options | Condition |
|---|---|---|
| Title Align | Left / Center / Right | Show Title is on |
| Meta Align | Left / Center / Right | Always shown |
| Excerpt Align | Left / Center / Right | Show Excerpt is on |
| Button Align | Left / Center / Right | Show Read More is on |
Colors
| Control | Targets | Condition |
|---|---|---|
| Card Background | .qf-card background | Always shown |
| Title | .qf-card-title and links | Show Title is on |
| Meta | .qf-card-meta and links | Always shown |
| Excerpt | .qf-card-excerpt | Show Excerpt is on |
| Button | .qf-card-button background color | Show Read More is on |
Layout & Style
| Control | Options | Notes |
|---|---|---|
| Alignment | Left / Center / Right | Responsive. Aligns the entire card content block. |
| Image Ratio | 16:9 / 4:3 / 1:1 | Controls aspect ratio of the featured image. Shown when Show Featured Image is on. |
| Border Radius | 0 – 40px | Responsive slider. Rounds the card corners. |
| Card Shadow | None / Soft / Strong | Controls the card drop shadow. Default: Soft. |
Style Tab
The Style tab contains two additional sections for fine-tuning canned card appearance. Both are only visible when a canned style is selected.
Typography
A duplicate typography panel in the Style tab targeting the same elements as the Card Design typography controls. Use whichever location is more convenient — changes in either place apply to the same CSS selectors.
| Control | Condition |
|---|---|
| Title | Show Title is on |
| Excerpt | Show Excerpt is on |
| Date & Author | Always shown |
Spacing
| Control | Options | Notes |
|---|---|---|
| Card Padding | px / em / % | Responsive. Controls padding on all four sides of each card individually. |
| Content Spacing | 0 – 50px | Responsive slider. Controls the vertical gap between each element inside the card content area. |
Results Summary
Displays a line of text showing how many results are being shown out of the total — for example, Showing 1–10 of 47 results. Available in both Free and Pro for canned card layouts. Off by default.
| Control | Options | Notes |
|---|---|---|
| Show Results Summary | On / Off | Off by default. Only visible when a canned style is selected. |
| Position | Above Grid / Above Pagination / Below Pagination | Controls where the summary line appears relative to the card grid and pagination controls. |
| Typography | Full Elementor typography group | Font family, size, weight, line height, etc. |
| Text Color | Color picker | Overrides the default color (#555). |
| Alignment | Left / Center / Right | Responsive. |
$query->found_posts for the total, posts_per_page from the Target node for page size, and the current page number to compute the start and end positions. It reflects the actual database result count, not just the number of cards visible on screen.
Pagination
Controls how users move through results when there are more than the Posts Per Page limit set in the Target node.
| Setting | Options | Edition |
|---|---|---|
| Show Pagination | On / Off | Free + Pro |
| Standard (Page Numbers) | Full page reload with ?paged=N URL | Free + Pro |
| AJAX (Page Numbers) | In-place update, no page reload, URL does not change | Pro only |
| Load More Button | Appends next page of results below existing results | Pro only |
| Infinite Scroll | Automatically loads next page as user scrolls toward the bottom | Pro only |
| Button Text | Custom label for the Load More button | Pro only |
| Scroll Offset | Distance from bottom of viewport to trigger next load (px). Default: 200px | Pro only |
Standard vs AJAX pagination
Standard pagination generates links that cause a full page reload with a ?paged=N URL parameter — good for SEO and shareable paginated URLs. AJAX pagination updates results in place without a reload, keeping scroll position — better for user experience on content-heavy pages.
Saving and Importing Queries
Query Forge lets you save any query canvas to a site-wide library and reload it into any widget at any time. This is how you build a query once and reuse it across multiple pages or widgets.
manage_options capability). Queries are stored per site and are not transferable between sites.
Save Logic
The Save Logic button in the top-right of the Query Builder commits the current canvas to the widget you opened it from. This is always the final step — it applies your query to the specific widget on the specific page you are editing. It does not save to the shared library.
Save As
The Save As button saves the current canvas to the shared query library so it can be reused elsewhere.
- Build your query on the canvas
- Click Save As in the toolbar
- Enter a name for the query when prompted
- Click OK — a confirmation appears when the save succeeds
Save As always creates a new entry — it does not overwrite an existing saved query with the same name. Each save is a snapshot of the canvas at that moment. Changes you make later on the canvas do not update the saved version unless you Save As again.
Import
The Import button opens a panel showing all queries in your saved library.
- Click Import in the toolbar
- The Import panel opens on the right side of the canvas, listing all saved queries with their name and save date
- Click Import next to the query you want to load
- The canvas is replaced with the saved query's nodes and edges
- Click Save Logic to apply the imported query to the current widget
Deleting a Saved Query
In the Import panel, each saved query has a Delete button. Deleting removes the query from the library permanently. It does not affect any widgets that are already using that query — those widgets store their own copy of the query logic.
How saved queries are stored
Saved queries are stored in WordPress options on the site where they were created. They are not transferable between sites. The library is shared across all users with administrator access on the site.
Typical workflow: Build once, deploy to many widgets
- Open the Query Builder on any page
- Build and test your query until it returns the right results
- Click Save As and give it a descriptive name (e.g. "Featured Products — Homepage")
- Click Save Logic to apply it to the current widget
- On a different page or widget, open the Query Builder
- Click Import, find your saved query, and click Import
- Click Save Logic to apply it to this widget
Preview Node PRO
The Preview node lets you see live query results directly on the canvas as you build — without saving or reloading the page. Drop one onto the canvas and it will automatically fetch and display matching post titles and IDs along with the total result count.
Adding a Preview Node
Click + Preview in the toolbar. The node appears on the canvas. Only one Preview node is allowed per canvas at a time — clicking + Preview again when one already exists highlights the existing node instead of creating another.
Node States
The Preview node has three visual states:
- Inactive — dashed border. Shown when there is no complete query path on the canvas. Message: Build a valid query to preview.
- Loading — solid border, fetching indicator. Appears briefly after a canvas change while the AJAX request is in flight.
- Results — displays a list of post titles and IDs from the first page of results, plus the total result count (e.g. 47 total results). If the query returns no posts, shows No results for this query.
Post IDs — copy on click
Each result row shows the post ID to the left of the title in a small monospace style. Click any ID to copy it to the clipboard — the ID flashes teal briefly to confirm the copy. IDs are useful for pasting directly into the Include/Exclude node to pin or exclude specific posts.
Search
A Search toggle in the Preview node header enables an inline search input. Type a term and press Enter or click Search to filter the displayed results by title. Toggle search off to return to the full results list.
How it updates
The Preview node watches the canvas schema. Whenever the schema changes — a node is added, removed, connected, or its settings are updated — the preview waits 600ms and then fires a new fetch. It updates once per change and will not re-fetch if the schema hasn't actually changed.
Deleting the Preview Node
Click the red × button in the top-right corner of the node to remove it from the canvas.
Source Preview PRO
Source Preview lets you browse the raw content of any Source node directly on the canvas — without running the full query. Enable it on a Source node to get an inline, searchable, paginated list of posts from that source. Useful for finding post IDs to use in Include/Exclude, or for confirming that the right content is available before building your query.
Enabling Source Preview
Click a Source node to open its settings panel. At the bottom of the settings, below the post type dropdowns, you will find a Source preview toggle. Switch it on and click Apply. The node will show a small teal indicator dot when preview is armed but the node is collapsed.
Opening the Preview Panel
With Source Preview enabled, click the Source node on the canvas. It expands downward to reveal the preview panel — the existing node header and source type are unchanged, and the preview content appears below them. Only one Source node can be expanded at a time. Clicking a different Source node collapses the current one and expands the new one. Clicking the canvas background collapses the panel.
Browsing Results
The panel loads the first 10 posts from that source, ordered alphabetically by title. Each row shows the post ID on the left in monospace and the post title on the right. The list is scrollable. Prev and Next buttons at the bottom paginate through results, with a page counter showing your current position.
Searching
Type a search term into the input at the top of the panel and press Enter or click Search. Results are fetched from the server matching that term against post titles. Clear the search field and search again with no term to return to the full list.
Copying Post IDs
Click any post ID in the list to copy it to the clipboard. The ID flashes teal briefly to confirm. Paste the copied ID directly into the Include/Exclude node's Post In or Post Not In fields to pin or exclude that specific post from your query.
Typical workflow: find and exclude a post by ID
- Enable Source Preview on your Source node
- Click the Source node to expand the preview panel
- Search for the post title you want to exclude
- Click its ID to copy it
- Add an Include/Exclude node to the canvas
- Open its settings and paste the ID into the Post Not In field
- Click Apply and connect the Include/Exclude node to your query
Query Builder Interface
Canvas
The main workspace. Right-click anywhere on the canvas to open the node menu, or use the toolbar buttons at the top. Drag from a node's right-side handle to another node's left-side handle to create a connection. Use scroll to zoom, drag the background to pan.
Toolbar
The top bar contains buttons to add each node type, Import (load a saved query), Save As (save current query with a name), Cancel, and Save Logic (commit the query to the widget).
Settings Panel
Click any node to open its settings in a panel on the right side of the canvas. Changes take effect immediately on the canvas but are not committed to the widget until you click Save Logic.
Node States
Nodes that are not on a complete path from Source to Target are visually dimmed. This indicates they will not contribute to the query. A query only executes the nodes that form an unbroken chain from Source to Target.
Minimap
The minimap in the bottom-right corner shows an overview of the full canvas. Useful when working with complex multi-node queries.
Source Node
The Source node defines where your query data comes from. Every query must have at least one Source node connected to the Target node.
Source Type Options
- Posts — standard WordPress posts
- Pages — WordPress pages
- Custom Post Types — any registered CPT; a second dropdown appears to select the specific type
- Users PRO — WordPress users, optionally filtered by role
- Comments PRO — WordPress comments, optionally filtered by status and post type
- SQL Table PRO — a custom database table
- REST API PRO — an external REST endpoint
Multiple Sources PRO
Pro allows more than one Source node on the same canvas. Each source runs independently with its own filter chain. Results are merged and sorted before pagination is applied. See Multiple Sources for full details.
Filter Node
Filter nodes narrow query results based on field values. Each Filter node specifies one condition: a field, an operator, and a value. Chain multiple Filter nodes to apply multiple conditions.
Field Selection
The field dropdown is populated from two sources: standard WordPress post fields (always available) and meta keys detected from posts of the selected source type (loaded dynamically). You can also type a custom field name directly.
Standard Post Fields
| Field | Description |
|---|---|
post_title | Post title — searches using a WHERE clause on the title column |
post_content | Post content — searches using a WHERE clause on the content column |
post_date | Publication date — uses WordPress date_query |
post_modified | Last modified date — uses WordPress date_query |
post_author | Author ID — maps to WP_Query author/author__in parameters |
post_status | Post status (publish, draft, pending, private, etc.) |
post_name | Post slug |
comment_count | Number of comments on the post |
Any other field name is treated as a meta key and handled via meta_query.
Operators
Available operators depend on edition. See Operators for the full reference.
Value
Enter a static value, or use Dynamic Tags PRO to inject context at runtime. Click the ⚡ button next to the value field to open the dynamic tag picker.
Value Type
Sets how the value is cast when building a meta query: Text (CHAR), Number (NUMERIC), or Date (DATE). Only applies to meta field filters.
Example: Filter by Meta Field
Field: featured
Operator: =
Value: yes
Type: Text
Returns posts where the featured meta key equals "yes".
Example: Filter by Post Status
Field: post_status
Operator: =
Value: publish
Returns only published posts. Note: by default Query Forge already restricts to published posts on the frontend, so this is only needed when you want to change that default (e.g. include drafts in a preview context).
Logic Node
Logic nodes combine multiple incoming filter branches using one of four relations. Connect two or more Filter nodes to the Logic node's left handle, then connect the Logic node's right handle toward the Target. Click the relation label on the node to cycle through the options.
Relation Options
| Relation | Behaviour |
|---|---|
| AND | A post must satisfy all incoming branches to be included |
| OR | A post that satisfies any one incoming branch is included. Duplicates are removed. |
| UNION | Combines results from all branches into one set, removing duplicates. Equivalent to OR in most cases. |
| UNION ALL | Combines results from all branches into one set, keeping duplicates. Useful when you intentionally want a post to appear more than once because it matched multiple branches. |
AND: Must match all conditions
Filter (post_status = publish) ──┐
├──> Logic (AND) ──> Target
Filter (post_date >= 2024-01-01) ─┘
Result: posts that are published AND from 2024 onward
OR: Match any condition
Filter (featured = yes) ──┐
├──> Logic (OR) ──> Target
Filter (on_sale = yes) ───┘
Result: posts that are featured OR on sale (or both), deduplicated
UNION ALL: Keep duplicates
Filter (category = News) ──┐
├──> Logic (UNION ALL) ──> Target
Filter (featured = yes) ───┘
Result: all News posts plus all featured posts — a post that is
both News AND featured will appear twice in the results
Chaining Logic with Filters
You can connect a Filter node downstream of a Logic node's output to add further narrowing after the relation is applied. The Logic node produces a result set, and any node downstream of it filters within that set.
OR then AND narrowing
Filter (featured = yes) ──┐
├──> Logic (OR) ──> Filter (post_status = publish) ──> Target
Filter (on_sale = yes) ───┘
Result: posts that are (featured OR on sale) AND published
Sort Node
Sort nodes define result ordering. Connect a Sort node between any node and the Target (or directly between Source and Target) to apply custom ordering. Multiple Sort nodes can be chained — the first in the chain is the primary sort, subsequent nodes are secondary sorts.
Sort Fields
| Field | Edition | Description |
|---|---|---|
date | Free + Pro | Publication date |
title | Free + Pro | Post title (alphabetical) |
ID | Free + Pro | Post ID (numeric) |
menu_order | Pro only | Drag-and-drop page order |
meta_value | Pro only | Text meta field value; requires Meta Key to be set |
meta_value_num | Pro only | Numeric meta field value; requires Meta Key to be set |
rand | Pro only | Random order (reshuffles on each page load) |
Direction
- ASC — ascending: A→Z, 1→10, oldest first
- DESC — descending: Z→A, 10→1, newest first
Example: Sort by Price (Pro)
Sort Node:
Field: meta_value_num
Meta Key: price
Direction: ASC
Result: products sorted cheapest to most expensive
Include / Exclude Node
The Include/Exclude node lets you explicitly pin specific posts in or out of the result set, and filter by author. Place it anywhere in the chain between Source and Target.
Settings
| Field | Format | Description |
|---|---|---|
| Post IDs — Include | Comma-separated IDs | Only include these post IDs (intersects with filter results) |
| Post IDs — Exclude | Comma-separated IDs | Remove these post IDs from results |
| Author IDs — Include | Comma-separated IDs | Only include posts by these authors |
| Author IDs — Exclude | Comma-separated IDs | Remove posts by these authors |
| Ignore Sticky Posts | Toggle | When on (default), sticky posts are not forced to the top |
All ID fields support Dynamic Tags PRO. You can mix static IDs and dynamic tags: 1,2,3,{{ current_post_id }}.
Example: Exclude Current Post (Pro)
Post IDs Exclude: {{ current_post_id }}
Result: all filtered posts except the one currently being viewed
Join Node PRO
Join nodes add a SQL LEFT JOIN to the underlying WP_Query, allowing you to filter posts based on data in custom or third-party database tables.
Settings
| Setting | Description |
|---|---|
| Table Name | Table name without the wp_ prefix. e.g. postmeta not wp_postmeta |
| Alias | Optional SQL alias for the table in queries |
| Left Column | Column from wp_posts to join on. Default: ID |
| Right Column | Column from the joined table to match. Default: post_id |
Generated SQL
LEFT JOIN wp_custom_orders AS orders ON wp_posts.ID = orders.post_id
Example: Filter Posts by Custom Orders Table
Join Node:
Table: custom_orders
Alias: orders
Left Column: ID
Right Column: post_id
Filter Node:
Field: order_status
Operator: =
Value: completed
Result: posts that have a completed order in the custom table
Target Node
The Target node is the output of every query. Every Source node must have a path that reaches the Target. There can only be one Target node per canvas.
Settings
| Setting | Default | Description |
|---|---|---|
| Posts Per Page | 10 | Number of results per page |
| Order By | date | Fallback sort field when no Sort node is present |
| Order | DESC | ASC or DESC |
Source: Posts
Queries standard WordPress posts (post_type = post). No additional configuration required. Use Filter nodes to narrow by category, tag, author, date, or any meta field.
Source: Pages
Queries WordPress pages (post_type = page). Useful for building page directories, sitemaps, or selecting specific pages by meta field.
Source: Custom Post Types
Queries any registered custom post type. After selecting Custom Post Types, a second dropdown appears listing all CPTs registered on the site. Select the one you want to query.
Common examples: Products (WooCommerce), Events (The Events Calendar), Courses, Testimonials, Team Members.
Pro users can enable plugin-grouped CPT lists under Settings → Query Forge License → Integrations — see Plugin Integrations.
Source: Users PRO
Queries WordPress users via WP_User_Query. Results are wrapped in post-like objects for compatibility with Elementor Loop Grid.
Settings
- Role — optionally filter by user role (Administrator, Editor, Author, Contributor, Subscriber, or any custom role). Leave blank for all roles.
Common use cases: Team member directories, author lists, member-only dashboards.
Source: Comments PRO
Queries WordPress comments via WP_Comment_Query.
Settings
- Status — Approved, Pending, Spam, Trash, or All
- Post Type — optionally restrict to comments on posts of a specific post type
Common use cases: Recent reviews, comment activity feeds, testimonial displays.
Source: SQL Tables PRO
Queries a custom database table directly. Results are wrapped in post-like objects for Loop Grid compatibility.
Settings
- Table Name — table name without the
wp_prefix
The table must exist in the WordPress database. Table names are validated for security — only alphanumeric characters and underscores are accepted.
Common use cases: Bookings tables, order history, any data stored in a non-standard WP table by a third-party plugin.
Source: REST API PRO
Fetches data from an external REST API endpoint and makes it available in the query pipeline.
Settings
- API URL — full URL to the endpoint including any required query parameters
- Method — GET or POST (default: GET)
Filter nodes applied after a REST API source operate on the fetched JSON data rather than the database. Pagination is calculated from the response.
Common use cases: External product catalogs, news feeds from external APIs, integrating third-party services into a Loop Grid.
Standard Fields
These fields map directly to WordPress post columns rather than meta keys. When used in a Filter node they are handled differently from meta filters — they modify WP_Query parameters directly or add SQL WHERE clauses.
| Field | How it filters | Notes |
|---|---|---|
post_title | SQL WHERE on post_title column | LIKE operator searches by title only, not excerpt or content |
post_content | SQL WHERE on post_content column | Use LIKE for full-text search within content |
post_date | WP_Query date_query | Use = for exact day, >= for after a date, <= for before |
post_modified | WP_Query date_query | Last modification date |
post_author | WP_Query author / author__in | Accepts author user ID |
post_status | WP_Query post_status | Default is publish + private on frontend |
post_name | WP_Query name | The post slug |
comment_count | Custom SQL WHERE clause | Supports =, >=, <= |
Any field name not in this list is treated as a meta key and runs through meta_query.
Meta Fields
Any field name that is not a standard post field is treated as a meta key. Meta filters are executed via WordPress's meta_query parameter.
The field dropdown auto-loads meta keys that exist on posts of the selected source type. You can also type a custom meta key directly or use the "Custom Field" entry option.
Value Type
When filtering by meta, set the Value Type to match your data:
- Text (CHAR) — default; string comparison
- Number (NUMERIC) — numeric comparison; use for price, count, rating fields
- Date (DATE) — date comparison for meta fields storing dates
Example: Filter by Numeric Price
Field: _price
Operator: >=
Value: 100
Value Type: Number
Result: products with a price of 100 or more
Filter Operators
Free Edition Operators
| Operator | Meaning | Works with |
|---|---|---|
= | Exact match | Text, numbers, dates, post fields |
!= | Not equal | Text, numbers, post fields |
LIKE | Contains (case-insensitive substring) | Text fields, post_title, post_content |
NOT LIKE | Does not contain (case-insensitive substring) | Text fields, post_title, post_content |
Pro Edition Operators
Pro adds the following operators to the filter node settings panel:
| Operator | Meaning | Use with |
|---|---|---|
> | Greater than | Numeric meta, dates |
>= | Greater than or equal | Numeric meta, dates |
< | Less than | Numeric meta, dates |
<= | Less than or equal | Numeric meta, dates |
EXISTS | Meta key exists (no value required) | Meta fields only |
NOT EXISTS | Meta key does not exist | Meta fields only |
Example: Posts Published After a Date (Pro)
Field: post_date
Operator: >=
Value: 2024-01-01
Result: posts published on or after 1 January 2024
Example: Posts Where Featured Image Exists (Pro)
Field: _thumbnail_id
Operator: EXISTS
Result: posts that have a featured image set
Logic Relations
When you chain Filter nodes directly (Source → Filter → Filter → Target) without a Logic node, each filter narrows the result of the previous one — they are implicitly ANDed in sequence. See Pipeline Execution for how this works internally.
A Logic node makes the AND/OR relationship explicit and allows branching: multiple Filter nodes feed into a single Logic node from different paths.
| Relation | Behaviour |
|---|---|
| AND | A post must satisfy every incoming branch |
| OR | A post that satisfies any one incoming branch is included |
AND vs OR — practical difference
AND example:
Filter (category = News) AND Filter (featured = yes)
→ Only featured posts that are also in the News category
OR example:
Filter (category = News) OR Filter (category = Events)
→ Posts in News OR Events (or both)
Pipeline Execution
Understanding how Query Forge executes your canvas is important when building complex queries, especially with multiple chained filters or multiple sources.
Single Filter
The simplest case: Source → Filter → Target. The filter's conditions are passed directly to WP_Query and the database does the work in one query.
Chained Filters (the pipeline)
When you chain multiple Filter nodes in sequence — Source → Filter A → Filter B → Target — Query Forge executes them as a sequential pipeline:
- Step 1: Filter A runs as a full WP_Query, returning a set of matching post IDs
- Step 2: Filter B runs as a new WP_Query, but constrained to only the IDs returned by Step 1 (via
post__in) - Each subsequent filter step narrows the result of the previous step
- If any step returns zero results, the pipeline short-circuits and the query returns nothing
Pipeline narrowing in action
Source (Products)
→ Filter A (post_status = publish) [Step 1: returns 200 IDs]
→ Filter B (featured = yes) [Step 2: filters within those 200, returns 12]
→ Target
Final result: 12 published, featured products
This is different from putting both conditions into a Logic (AND) node, which would combine them into a single database query. The pipeline approach is useful when each condition needs to be evaluated independently — for example, when one condition filters on a standard field and the next filters on a meta field.
OR steps in a pipeline
When a Logic (OR) node is part of a chain, the OR step unions its result with the previous step's result rather than narrowing it:
- AND step (default): take only the IDs that appear in both the previous result and the current step
- OR step: take all IDs from the previous result plus all IDs from the current step (deduplicated)
Multi-Source Pipelines PRO
When the canvas has multiple Source nodes, each source runs its own independent pipeline. After all sources have been processed, their results are merged into a single pool, sorted, and paginated. See Multiple Sources for details.
Multiple Sources PRO
Pro allows you to add more than one Source node to the same canvas. Each source can have its own independent chain of Filter nodes before they all converge at the Target node.
How it works
- Each source runs its complete filter pipeline independently
- Results from all sources are merged into a single pool
- The merged pool is sorted using the Target node's sort settings (or Sort nodes)
- Pagination is applied to the merged, sorted pool
Example: Two Post Types, Same Filters
Source (membercontent) ──┐
├──> Filter (post_content LIKE "tutorial") ──> Logic (OR) ──> Target
Source (reminders) ──────┘ Filter (post_content LIKE "guide")
Result: posts from either CPT whose content contains "tutorial" or "guide",
merged and sorted together by the Target node's sort setting
Per-source filter chains
Each source can have a completely different filter chain. The canvas routes each source's outgoing edge through its own set of filter nodes before converging at Target. Filters connected downstream of a specific source only apply to that source's results.
Example: Different Filters per Source
Source (Products) ──> Filter (featured = yes) ──────────────────┐
├──> Target
Source (Events) ──> Filter (post_date >= 2024-01-01) ─────────────┘
Result: featured Products merged with Events from 2024 onward, sorted together
Include/Exclude with multiple sources
An Include/Exclude node placed on a specific source's path applies only to that source. This lets you, for example, exclude the current post from one source but not another.
Sorting merged results
After merging, all results are sorted using the Target node's sort field and direction. The sort operates on the properties of each result object — for post-type sources this is the standard post fields (post_date, post_title, etc.); for user or comment sources, equivalent fields are mapped.
Mixed Queries PRO
A mixed query combines sources of different types — for example, Posts and Users, or Events and Comments — in a single query. The execution model is the same as multiple sources: each source runs independently, results are merged, sorted, and paginated.
Example: Activity Feed
Source (Posts) ──────────────────────────────┐
├──> Target (20 items, date DESC)
Source (Comments) ──> Filter (status = approve)┘
Result: recent posts and approved comments sorted by date, newest first
Joins PRO
The Join node adds a SQL LEFT JOIN to the underlying WP_Query, allowing filters to operate on columns from a related custom table. See the Join Node reference for configuration details.
When to use Joins
Use a Join when the data you need to filter on lives in a separate database table — not in wp_postmeta. Common scenarios: a third-party plugin stores order data or booking records in its own table and you want to surface related posts based on that data.
Connection pattern
Source → Join → Filter → Target
The Join node must come before Filter nodes that reference the joined table's columns. The connection left-to-right on the canvas determines the SQL join order.
Plugin Integrations PRO
Pro can group post types from popular plugins into a dedicated section in the Custom Post Types dropdown, making it easier to find them in the Query Builder.
Enabling integrations
Go to Settings → Query Forge License → Integrations. Only plugins that are installed and active on your site appear in the list. Enable the ones you want — their post types will appear under a divider in the source dropdown.
Supported plugins
| Plugin | Post Types surfaced |
|---|---|
| WooCommerce | Products, Orders, Coupons |
| Easy Digital Downloads | Downloads |
| The Events Calendar | Events, Venues, Organizers |
| bbPress | Forums, Topics, Replies |
| WP Job Manager | Job Listings |
More integrations may be added in future updates.
Basic Examples
Latest Blog Posts
Display the 6 most recent published blog posts.
Source (Posts) ──> Target (6, date DESC)
No filter needed — Query Forge restricts to published posts by default on the frontend.
Posts from a Specific Category
Source (Posts) ──> Filter (post_category = 5) ──> Target (10, date DESC)
Replace 5 with the term ID of your category.
Featured Products
Source (Products CPT) ──> Filter (featured = yes) ──> Target (12, date DESC)
Posts Containing a Keyword
Source (Posts) ──> Filter (post_content LIKE wordpress) ──> Target (10, date DESC)
LIKE is a substring match — this returns any post whose content contains the word "wordpress".
Advanced Examples
Posts Matching Either of Two Keywords (OR Logic)
Source (Posts)
──> Filter (post_content LIKE tutorial) ──┐
├──> Logic (OR) ──> Target (10, date DESC)
──> Filter (post_content LIKE guide) ─────┘
Returns posts whose content contains "tutorial" or "guide" (or both).
Posts That Must Match Two Conditions (AND Logic)
Source (Posts)
──> Filter (featured = yes) ──────────────┐
├──> Logic (AND) ──> Target (6, date DESC)
──> Filter (post_status = publish) ───────┘
Returns only posts that are both featured and published.
Chained Filters (Pipeline Narrowing)
Source (Posts)
──> Filter (post_content LIKE tutorial)
──> Filter (post_content LIKE advanced)
──> Target (10, date DESC)
Step 1 fetches posts containing "tutorial". Step 2 narrows that set to only posts that also contain "advanced". Equivalent to an AND but executed as two separate queries.
Sorted by Custom Field
Source (Products CPT)
──> Filter (featured = yes)
──> Sort (meta_value_num, meta_key: price, ASC)
──> Target (12)
Featured products sorted cheapest to most expensive. Requires Pro for meta sort.
Pro Examples PRO
Related Posts — Same Category, Exclude Current
Source (Posts)
──> Filter (post_category = {{ current_post_terms:category }})
──> Include/Exclude (Exclude: {{ current_post_id }})
──> Target (6, date DESC)
Shows posts from the same categories as the post being viewed, excluding that post itself.
My Saved Items Dashboard
Source (Posts)
──> Filter (post_author = {{ current_user_id }})
──> Target (20, date DESC)
Shows only posts authored by the currently logged-in user. Returns nothing for non-logged-in visitors.
User Directory — Editors Only
Source (Users, Role: Editor) ──> Target (20, title ASC)
Lists all users with the Editor role, sorted alphabetically.
Two CPTs, Independent Filters, Merged Result
Source (membercontent) ──> Filter (post_content LIKE disassociation) ──┐
──> Logic (OR) ├──> Target (10, title DESC)
Source (reminders) ──> Filter (post_content LIKE disassociation) ──┐ │
──> Logic (OR) └────┘
(each source has its own filter chain; results are merged before sorting)
Both CPTs run the same filter logic independently. Their matching posts are merged into one pool and sorted by title before pagination.
URL-Filtered Product Listing
Source (Products CPT)
──> Filter (post_category = {{ url_param:cat }})
──> Target (12, date DESC)
Category is driven by the URL: /shop/?cat=5 shows category 5 products. When cat is absent from the URL, the filter resolves to empty and may return all products depending on how WP_Query handles the empty condition.
Common Patterns
Simple List
Source → Target
All posts of the selected type, paginated. No filtering applied.
Single Filter
Source → Filter → Target
One condition, one database query.
AND Conditions via Logic Node
Source → Filter A ──┐
Filter B ───┼──> Logic (AND) → Target
All conditions must be true. More efficient than chaining — executes as a single query.
OR Conditions via Logic Node
Source → Filter A ──┐
Filter B ───┼──> Logic (OR) → Target
Any condition may be true. Useful for "this category or that category" scenarios.
Sequential Narrowing (Pipeline)
Source → Filter A → Filter B → Filter C → Target
Each filter narrows the previous result. Three separate queries. Use when each condition needs independent evaluation.
OR then AND
Source → Filter A ──┐
Filter B ───┼──> Logic (OR) → Filter C → Target
(A OR B) AND C. The Logic node produces a union, then Filter C narrows it further.
Multiple Sources, Merged Results (Pro)
Source A → Filter ... ──┐
Source B → Filter ... ──┼──> Target
Source C → Filter ... ──┘
Each source runs independently. Results are merged, sorted, and paginated together.
License Management
Activating
- Go to Settings → Query Forge License
- Enter your license key
- Click ACTIVATE
- Status updates automatically — Pro features become available immediately
Deactivating
- Go to Settings → Query Forge License
- Click DEACTIVATE
- The activation slot is freed and can be used on another site
Transferring to a New Site or Domain
Deactivate on the old site first, then activate on the new site using the same key. Each activation uses one slot from your license tier.
License Status
- Active — all Pro features enabled
- Inactive — Free features only
- Grace Period — if our license API is temporarily unreachable, Pro features remain active for 14 days. After 14 days without successful validation, Pro features are disabled until the API is reachable again.
Plugin Integrations (Pro)
On the same license settings page, the Integrations section lets you choose which plugin post types appear in the Query Builder. Only active plugins on your site are listed. See Plugin Integrations for details.
Troubleshooting
Query returns no results
- Check that all nodes have a complete connected path from Source to Target. Any broken link produces no output — look for dimmed nodes on the canvas.
- Check your filter conditions — they may be too restrictive for the available data
- Verify the source type matches your data (e.g. the CPT slug is correct)
- Check post status — by default only published and private posts are returned on the frontend
- Review any include/exclude settings
- If using dynamic tags, check what the tag resolves to for the current visitor (e.g.
{{ current_user_id }}returns 0 for non-logged-in users)
Results are missing some posts
- Check whether chained Filter nodes are too restrictive — each step in the pipeline narrows the previous result
- Verify that the posts exist with the field values you are filtering on
- Check the Value Type setting on meta filters — a numeric field filtered with type Text may not match correctly
Pro features not available
- Confirm the license is activated: Settings → Query Forge License
- Check that status shows "active"
- Clear any caching plugin caches
- Ensure you have the Pro plugin installed, not just the Free version
Dynamic tags not resolving
- Confirm you are using Pro — dynamic tags are a Pro feature
- Check that the tag syntax is exactly
{{ tag_name }}with double curly braces - For
{{ current_post_id }}— this only resolves on singular post/page templates, not archive pages - For
{{ current_user_id }}— returns 0 for non-logged-in visitors - For
{{ current_post_terms:taxonomy }}— ensure the taxonomy slug is correct and the current post has terms assigned
Join not working
- Verify the table name is correct and does not include the
wp_prefix - Check that column names match the actual table structure
- Confirm the table exists in the database
- Verify your Pro license is active
REST API source returning no data
- Confirm the API URL is correct and accessible from your server
- Check that the API does not require authentication headers that are not being sent
- Check the browser console for network errors
- Verify the response format matches what Query Forge expects (JSON array or object)
Saved queries not loading
- Confirm the query was saved successfully (you saw the confirmation)
- Check the browser console for JavaScript errors
- Ensure your user has edit permissions on the page
- Try refreshing the Query Builder
Multi-source results in wrong order
Multi-source queries are sorted after merging using the Target node's sort field. Ensure the sort field exists on all result types. If sorting by a meta field, all sources must have that meta key for consistent ordering.