The Search & Filter – Simply Static integration lets your faceted search keep working after your WordPress site has been exported to a static site.
Enable it in Simply Static, build your search with Search & Filter Pro as you normally would, then run a Push. This will ensure that your filters, live search, and results run on the static site, with requests handled in the background by your WordPress install.
What you’ll need
- Simply Static Pro or Simply Static Studio: the integration lives in Simply Static Pro. With Simply Static Studio, some of the server setup below is handled for you.
- Search & Filter Pro: the free version of Search & Filter is not sufficient for this integration.
Enable the integration
The Search & Filter integration must be activated in Simply Static first:
- In your WordPress admin, open Simply Static and select Integrations from the left sidebar (under the Advanced section).
- The menu is labeled Simply Static Studio on the Studio platform and Simply Static in the plugin. In the WordPress admin dashboard, you can also reach it via Tools > Static Studio > Integrations.
- Turn on the Search & Filter integration. Simply Static handles the configuration for you.
- Configure CORS if your static site and WordPress live on different domains (see the next section). On Simply Static Studio, this is taken care of for you.
With the integration active, you can now set up your search and filter pages and forms. When you’re ready, run a Push to export your site. Your static site will now let customers use your faceted search and filtering features.
Simply Static Studio
Using the Simply Static Studio platform? The steps to enable the Search & Filter integration are the same, but instead, Studio manages the server-side CORS configuration automatically, so you can skip the manual setup below.
Configuring CORS
Search & Filter needs to make requests from your static site back to your WordPress install to work properly. So, if the two live on different domains, you’ll need CORS (Cross-Origin Resource Sharing) configured on your server. This is the same server-side CORS setup Simply Static uses for form submissions, so if you’ve already configured it for forms, you’re all set.
To properly configure your site, you’ll need to configure your WordPress server to return these headers for the REST endpoint, and answer preflight OPTIONS requests with a success status:
Required headers
Access-Control-Allow-Origin: https://your-static-site.com
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-Simply-Static-Secret
Use your exact static site origin rather than * — it’s more secure, and a wildcard isn’t reliable once custom headers are involved. Include every custom header you’ve added to the webhook.
Apache
Apache uses mod_headers, which must be enabled. Add this to your virtual host config or an .htaccess file in your WordPress root, then return a success status for preflight requests:
<IfModule mod_headers.c>
Header always set Access-Control-Allow-Origin "https://your-static-site.com"
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type, X-Simply-Static-Secret"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^ - [R=204,L]
</IfModule>
NGINX
Add the headers to the block that serves your REST API, and handle the OPTIONS preflight inside it. The headers must be repeated inside the OPTIONS block, because add_header directives don’t carry over into it:
location /wp-json/ {
add_header Access-Control-Allow-Origin "https://your-static-site.com" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type, X-Simply-Static-Secret" always;
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin "https://your-static-site.com" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type, X-Simply-Static-Secret" always;
add_header Content-Length 0;
return 204;
}
# keep your existing try_files / fastcgi_pass directives here
}
Reload NGINX after saving (nginx -s reload).
LiteSpeed
LiteSpeed reads Apache-style .htaccess directives, so the Apache snippet above usually works as-is. Alternatively, set the same headers in the LiteSpeed WebAdmin console under the relevant virtual host context, then perform a graceful restart.
If you can’t edit the server config
You can send the headers from WordPress instead. Add this to your theme’s functions.php or a code snippets plugin:
add_action( 'rest_api_init', function () {
add_filter( 'rest_pre_serve_request', function ( $value ) {
header( 'Access-Control-Allow-Origin: https://your-static-site.com' );
header( 'Access-Control-Allow-Methods: GET, POST, OPTIONS' );
header( 'Access-Control-Allow-Headers: Content-Type, X-Simply-Static-Secret' );
return $value;
} );
}, 15 );
For the full walkthrough, including how to verify the fix with your browser’s Network tab or curl, see Simply Static’s complete guide: Fixing CORS errors.
Setting up your search
With the integration enabled, build your search in Search & Filter Pro exactly as you would on any WordPress site. If you’re new to Search & Filter, these guides walk you through each step:
- Create a query: define what you want to filter (post types, taxonomies, custom fields, live search, and more).
- Create a field: add the inputs your visitors use to search and filter, and connect them to your query.
- Build a layout: place your fields and results on a page using blocks, shortcodes, or your page builder.
Once your search works on your WordPress site, run a Push and it’s live on the static site.
Push your site
Publishing is the final step. You’ll need to run a Push whenever you change any of the Search & Filter settings, or anything else on the site, to update the static version. How you do it depends on whether you’re using the Simply Static Pro plugin or Simply Static Studio:
Simply Static Pro
- In your WordPress admin, open Simply Static.
- Leave the scope set to Full Site for your first export. After that, you can choose a smaller scope to update only what’s changed.
- Click the Push button. Simply Static crawls your site, collects every page and file, and sends them to the destination set under Deploy.
- Follow the progress in the Activity Log as it crawls, fetches, and transfers. When you see the Done! line, your static site is live, with the search and filtering features implemented.
For the full details on export scopes, deployment destinations, and the export log, see Simply Static’s guide: Push your static site.
Simply Static Studio
If you’re using the Simply Static Studio, you can push from the Studio dashboard or from inside WordPress:
- From the Studio dashboard, click Push, then choose push only changes or push the entire site. The site status moves from exporting to deployed when it’s done.
- From WordPress, use the Simply Static Studio command bar at the top of the screen. It shows how many changes have been detected. Click Push to send them, and the Activity Log updates in real time as pages and files transfer.
- To publish just one post or page, use the Push button in the editor (Block Editor, Classic Editor, or a supported page builder).
Studio tracks changes for you and supports rollbacks. For the full walkthrough, see the Studio guide: Push Static Site (Studio).
Already works with your page builder
There’s no separate step for the builder itself. Set it up as you normally would, and with the integration enabled, it exports to your static site like any other page.
You can find out how to use Search & Filter with the relevant integrations here: https://searchandfilter.com/documentation/#h-integrations
