• This is my first topic in WP. I created one page “post” for user post and added the below code in that page [in theme]. Using this code i got post title, content and category section. But i dont get any idea for tag autocomplete like admin section. What is the solution for this?
    post.php

    <?php
        $content='text';
        $editor_id='tinymce';
            wp_enqueue_script('jquery.autocomplete.pack');
            wp_enqueue_script('jquery-ui-autocomplete');
            get_header();
    ?>
    <div>
    <input type="text" name="post_title" id="post_title" size="30" value="New Post" id="title" autocomplete="off" />
    <br /><br />
    <?php wp_editor( $content, $editor_id, $settings = array('editor_class'=>'user-post-editor','') ); ?>
    </div>
    <div style="
        display: inline-block;
        margin-left: 5%;">
    <?php $args = array(
    	'orderby'            => 'ID',
    	'order'              => 'ASC',
    	'hide_empty'         => 0,
    ); ?>
    <h3>Category</h3>
     <?php wp_dropdown_categories( $args ); ?>
     <br /><br />
    <h3>Tag</h3>
    Need Tag Input
    </div>
    
    <?php get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mmbalaa

    (@mmbalaa)

    I need autocomplete tag selection in front end side like admin post

    Moderator bcworkz

    (@bcworkz)

    Hmmm. The tag dialog box is a metabox. Metaboxes are intended only for the backend, not the front end. I’ve no idea if this would work, but you may want to try it on the chance that it would work.

    You need a back end screen to add the meta box to, so go ahead and create one using the Administration Menus interface. You can hide it with CSS or something, but you need an admin screen to add metaboxes to, even if you do not use it.

    Go ahead and add the ‘post_tags_meta_box’ to your new admin screen. Now on your front end page, you should be able to call do_meta_boxes() passing your new admin screen ID on the front end page and the tag dialog box will hopefully be displayed when you load the page. Good luck.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Autocomplete Tag option For post’ is closed to new replies.