Simply make an HTML form in Elementor on the archive page where you want to search.
Code:
<form class="zohaib-search-form" role="search" action="/courses" method="get">
<input placeholder="Search.." name="s" type="search">
<button type="submit"><i class="fas fa-search"></i></button>
**Note:** name property of input should be ‘s’ because the search query is looking for key ‘s’ to get and run it.
Replace the action property with your custom post type. It will only work if the action link will be an archive page. After submit the search the filter result will also show on the same archive page like mine courses archive page.
Related Posts:
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- How to display comments and comment form on custom post type?
- wp_query ‘s’ parameter does not work with custom post type
- Search results posts_orderby and ID
- What would causes search to return incorrect results?
- search form for custom fields
- How to create custom search form function including post “tags”
- WordPress search for specific Post Type
- Display result of custom form
- Customize search results to include custom posts and display in a specific template page
- How can i retrive the movies, trailers, news in a single page using search
- Custom Post Title as search term
- Is there a action hook for the “Empty Trash” button?
- Add a checkbox to post screen that adds a class to the title
- delete post also attachments
- Attach pdf file to custom post type
- I am trying to create a simple frontend form for posting
- how to hide specific post from google search
- Navigation link to specific user page
- How to edit wordpress RSS feed to show post title only
- Add custom field to category of custom post type
- Search widget breaks when using multiple loops?
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- user contributed content as custom post types
- Remove custom posts that match taxonomy value
- Custom Theme Want To Remove One Category From All Displays
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- Filter Posts By Tag
- Search for posts based on their url in the admin?
- Post Type Label Name
- Blog Posts in Custom Menu
- How to display data in archive page?
- Display posts styled exactly like default posts
- Move first half of posts to one parent page, second half to the other page
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- CPT archive redirects to single post
- Prevent Delete Attachment by URL or When Submit
- How can i limit the number of posts created per category?
- Turn On Comments On Custom Post Types in Directory Theme
- Responsive images with custom image size
- Duplicate Custom Post Type and Taxonomy Slug
- Take a received feedback item, turn it into a post
- Calling Different Custom Post Timestamps in a table
- How to allow visitors to filter posts by multiple taxonomies
- How do I change the core post search algorithm? Where is it found/constructed?
- How to include my own css in post
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- Best Way to Add UnEditable HTML to Posts
- How safe is it to delete old posts edits to save database space?
- Refresh problem post is duplicated when page is submitted after page reload
- Create a custom posts page
- How to get different Related Posts
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- register_post_type permalink
- Custom Post Limit for homepage only without plugin?
- Inserting an example of the last 3 post on to the homepage
- Static pages not working
- Post titles and thumbnails as links to custom post types?
- Adding a custom post type meta field to rss
- Help with listing current users submitted custom post type in template file
- Deleting old posts
- How To Use Custom Tax of a Post Type
- In admin panel, use a form to create a post?
- How to let a user create a post by submitting a POST form?
- get posts, run a custom query, and join the results
- How to show only homepage in google results instead of privacy, contact pages
- Redirect to custom post if custom archive page has just one result?
- Multiple posts in one page
- delete post hook not being fired when deling in wordpress dashboard admin
- WordPress Delete Users from backend doesn’t work
- Is it possible to make a custom post that adds multiple pages?
- Custom post styling per category?
- Creating a frontend blog post form for logged in users only
- How to hide meta from search result only on pages?
- Hook To Get All Posts Deleted
- Meta boxes not saving
- Custom Select Query pagination not working properly
- Custom URL Structure for posts with subcategories
- How to show the posts list into a static page? Problems to use the loop into a static page
- Adding The Post Template Dropdown to WP-Admin
- wordpress paginate, link to the right page
- Allow users to create their own page/s
- 404 for some custom taxonomy not ALL taxonomy
- Add default content to post (for specific category)
- Setting default category for display
- WordPress strips some attributes for author posts
- How to Do Custom Fields to Output a Definition List
- Get Video Attachment to post
- Display one post randomly from category on home page
- Deleting first four characters from all Post Titles
- Deleling wordpress posts permanently still have IDs
- Taxonomy Category category.php not working
- Post’s arent displaying
- Can I get custom post items in select box (dropdown)
- How to have 2 posting pages on a blog
- Dynamic Menu Item
- Changes done in admin panel are taking time to reflect in the REST api responses
- I have a website issue I am trying to resolve