If you’re building a smart way to verify certificates in WordPress, then advanced search filtering using ACF is exactly what you need. With tools like Advanced Custom Fields (ACF), custom post types, and some smart shortcode logic, you can provide users a fast and easy way to validate documents. Whether it’s for a coaching institute, corporate training, or online course platform β this method is simple, efficient, and scalable.
In this tutorial, we walk you through a complete example of how to create a dynamic certificate verification system in WordPress that uses ACF field filtering.
What Youβll Build
- A front-end certificate verification form styled for Elementor or Gutenberg
- Dynamic results shown based on student_name and registration_number
- A fallback message when no match is found
- Secure and SEO-friendly integration using WordPress custom post types and ACF
The system is powered by advanced search filtering using ACF, a reliable method for creating smart content queries in WordPress.
Step-by-Step Setup
1. ACF Field Setup
Make sure your certificate
post type has these ACF fields:
student_name β Text field
registration_number β Text field
certificate_url β File or URL field
Use WordPress’ Featured Image as a certificate preview
These field names and keys must match exactly to ensure search accuracy.
2. Front-End HTML Form (Do Not Change)
Here is the exact form you should embed on your Elementor or WordPress block page. Itβs clean, responsive, and user-friendly.
Certificate Verification
Enter your details to access your certificate
This form will send GET
values (student_name
and registration_no
) to the current URL. Those values are captured via shortcode to generate results using ACF meta queries.
3. Add the PHP Shortcode
This shortcode fetches results based on the submitted data and displays matching certificate info. You must add it to your themeβs functions.php
or a custom plugin.
function certificate_search_results_shortcode() {
ob_start();
if (isset($_GET['student_name']) && isset($_GET['registration_no'])) {
$student_name = sanitize_text_field($_GET['student_name']);
$registration_no = sanitize_text_field($_GET['registration_no']);
$args = [
'post_type' => 'certificate',
'posts_per_page' => 1,
'meta_query' => [
'relation' => 'AND',
[
'key' => 'student_name',
'value' => $student_name,
'compare' => '='
],
[
'key' => 'registration_number',
'value' => $registration_no,
'compare' => '='
]
]
];
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
?>
Certificate Not Found
We couldn't find a certificate matching:
Name:
Registration ID:
Please verify your details and try again.
Then, place the shortcode [certificate_search_results]
directly under the form on the same page to display results dynamically.
Why Use Advanced Search Filtering with ACF?
Using advanced search filtering with ACF provides:
π Precise results based on meta fields
π‘ Custom search forms outside the WordPress loop
βοΈ Control over how data is retrieved and displayed
π Fast performance with optimized WP_Query filters
β Clean structure for building verification, directories, and archives
This method is especially useful when default search features in WordPress fall short β like when users must filter by two fields or unique identifiers.
Final Thoughts
With this system, youβve created a professional-grade certificate verification system using advanced search filtering with ACF β all without any complex plugins or bloated solutions. Itβs scalable, elegant, and perfect for course websites, educational platforms, or employee portals.
Use this approach to power other types of searches too β for example: student records, event passes, registration lookup, or ID validation.