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
- wp.media update options and force render on uploader
- WordPress Plugin Development from Scratch. How? [closed]
- Restrict individual category combinations
- Automatic updates not working/plugins not installing
- append stylesheet via shortcode
- Is it possible to filter the wp_footer() scripts, read the content, and insert them inline?
- How to call bind function in wordpress actions or hooks
- clean wp_options table unused rows
- ‘wp_login’ action hook not working with wp-login.php file
- Can WordPress Plugin Directory Cache Delay the Upload of Images?
- Hook (or other way) to find out when another plugin is activated / installed
- Issue using wp-load.php in WordPress Plugin Development
- How to change custom post type pemalink Hierarcy
- Calendar Solution: Handling upcoming Dates with Posts?
- Disable woocommerce cookies and delete cart data automatically
- Why required field not working in Country dropdown in WooCommerce –
- WordPress: cleaning media library
- How to Display Taxonomy Custom Meta Box Data in Archive Page?
- List the authors that have written posts in a category
- Is there any plugin which can paste a common content to my every post?
- My custom plugin did not create db tables in database
- Combining several CSS files into one for optimization
- Theme Custom Pages
- Is it a standard to have an empty `index.php` in root of Plugin? [duplicate]
- WordPress Fatal Errors [closed]
- Possible?? Pull Plugin Property Data to a Theme’s Custom Post Type
- WordPress plugin require_once unexpected
- Is there a way to input different rel=author and rel=publisher attributes for a WP blog w/ multiple authors?
- Plugin is creating posts twice
- Accessing widget information
- Update WordPress Theme System
- Oops! That page can’t be found
- post title not changing at post page
- show wc_add notices on particular page in woo commerce custom plugin development
- How to generate expiring URL of the page?
- Custom Formdata matching with user table
- Code Snippets plugin by Shea
- Why my multisite is this slow? (stats inside)
- Update User Meta Via Ajax
- wordpress plugin page error
- Update page (update-core.php) & Plugins page (plugins.php) revert to homepage
- trying to create simple plugin to filter categories from all authors
- Standalone Project Login with WP Login
- Proper Failure of Plugin Activation
- cPanel login from WordPress
- How to use wordpress with any “site url” (the url in settings) for development?
- WordPress 3,5 and Jquery version
- WooCommerce, different prices based on location [closed]
- Creating a press page for our project
- WooCommerce Order Status Displays Twice on Order Page
- WordPress plugin header already sent
- Order custom post type by posts with most likes first
- WordPress website is redirecting on some different shopping page
- Pulsing circle before the post title (Breaking news flash)
- Adding fontAwesome to Primary Menu returns after saving the menu