you can do that using JQuery autocomplete plugin
and once you have included all of the needed JS files just add this code after your new post form
$terms = get_terms("post_tag");
$tags="";
$count = count($terms);
if ( $count > 0 ){
foreach ( $terms as $term ) {
$tags .= '"'.$term->name.'", ';
}
$tags = substr($tags,0,-2);
}
echo ' <script>
JQuery("#post_tags").autocomplete(['.$tags.'], {
width: 320,
max: 4,
highlight: true,
multiple: true,
multipleSeparator: ", ",
scroll: true,
scrollHeight: 300
});
</script>';
note: Now this is good if you only have a small number of tags, but if you have hundreds or thousands of tags then using an ajax solution is a must.
Related Posts:
- How can I allow commas in tag names?
- How to customize woocommerce related products? [closed]
- Contact form 7 select box different value-text than content-text in option [closed]
- How to not allow users to create new tags, but allow to them to use existing ones
- Plugin to restrict non-admin user to existing tags
- Remove from Google Tags with less than 2 posts
- Woocommerce: Changing the variations select default value? [closed]
- Tag link suggestion plugin
- How to output CMB2 select options from repeated groups select elements?
- How to add tags in Submenu page or Menu page
- how to add text to posts from tags
- WordPress “Categories to tags converter” not working. Pointing to import.php instead
- the_tags : can we insert a class
- Set post tags using tag ID
- How to transfer data from an additional field in the tags?
- Adding option values as an array using a multi selectable select box
- Select Form Element Not Saving from Plugin Options
- WordPress “Add new tag” button is not working
- Get Page URI for QR Code PHP [closed]
- Is there any necessary to use tag plugins like simple tagging in wordpress 3.0+
- how to create hierachial taxonomy and manage under single post type?
- Editable select options in quick edit OR in plugin settings
- Best approach to make all tags searchable by the wordpress search function
- Elementor: How to design Dropdown Select Box Navigation page like Chegg
- Load google font script based on optgroup label selected
- add tags to wordpress post using REST API
- I want to display “how many times this tag used in WordPress?”
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Exclude Tag Links from and Text
- How to change the product short description for each product with PHP?
- AddThis Plugin adding html comments in P tags
- How to Display image from Menu Image in Walker Dropdown Select Menu
- Find all strings between an enclosing shortcode
- Trending Tags based on post views
- wordpress option page data from select form is not saving to database
- Multiselect value in wp_query
- Strip shortcode from excerpt [duplicate]
- WordPress “Categories to tag converter” not working on imported Blogger posts
- Output dropdown results into Woocommerce Order details
- Customize Multi-Column Tag Map to fetch specific post-type
- how to add “alt” for all image in wordpress
- Fetching Video From YouTube Automatically [closed]
- Custom wordpress plugin does not save select element
- Real estate schema markup not showing up on Rich Results test
- How to export post tags from wordpress
- Getting a Page via its post-name using WP REST API v2 and Postman
- How to get all posts belongs to a user between a certain date
- Add estimated value for a post according to the number of words
- Passing stored variables to add_filter
- Does heavy theme and plugins affect server’s response time? [closed]
- How can I delete a wordpress widget instance?
- order posts by `meta_key`, Does not display posts that does not have `meta_key`
- Repeated Output in Widget
- How do I make a secure API call from a shortcode when a button is clicked?
- A question about register_activation hook
- Adding Static Image to WooCommerce Content-Single-Product template
- plugin shortcode not working on ajax request call
- Displayed content disappears when adding attributes to shortcode
- Modify page title and subtitle with a plugin
- One sub site is slow while all others load fine, same theme & plugins [closed]
- Issues with a WP plugin menu system
- How to protect WordPress from security scanner [closed]
- Add back to post link on blank comment post error page
- override filter in a plugin
- Check filter defined or not?
- How to track clicks
- How to load different homepage on Mobile.?
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- WordPress REST API Plugin Development – Add Custom Endpoint
- Shortcode Placeholder Plugin
- Where to find the code used to render a page that has a shortcode and a template defined?
- WordPress 4.3 broke meta redirect (with url params plugin)
- How to prevent PHP fatal error if plugin hasn’t been enabled and a method is called in theme file?
- how to prevent all css and javascripts files from loading
- Moving a plugin js to footer
- Optimizing site
- Shortcode not working after move wordpress website files
- Integrate Algolia to WordPress site
- Contact Form 7 – Form name blank [closed]
- update_option_{$option} not showing old value
- How to allow Contributors to publish articles after approval
- How do I get a post author’s image/avatar via RSS from another blog?
- Exclude posts from widget while post is showing on home, single and categories
- Create a post builder skin in a plugin
- Remove / overwrite some functions in buddypress.js
- remove_action not removing add_action from constructor
- wordpress add_action() issue in ajax call
- WordPress Admin Menu defining function is seperate file
- Remove Yoast jQuery from front end
- Shortcode not getting replaced
- Front-end CSS Library for plugin [closed]
- Locked out of admin panel after installing HC Custom WP-Admin URL [closed]
- How to display checked posts on another page over AJAX? (like comparasion style)
- Events Manager plugin – booking form required fields
- How do i get file_get_contents to work in wordpress
- Custom widget doesn’t save values from dropdown box
- Plugin Development – Functions or Hooks?
- Add bcc to contact from on wordpress
- How do I override plugin templates and stylesheets?
- What happens when WordPress memory limit is exceeded?