Title: Setting Post Title
Last modified: August 19, 2016

---

# Setting Post Title

 *  [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/)
 * Hi guys,
 * So heres what I’m trying to do. I’m editing a plugin and in the submit video 
   form (where admins sumbit a video) the plugin has an input title (for the post)
   field. What I’m trying to do is combing the category name (the plugin already
   has the input field for it) and another input field and set it as the title for
   the post.
 * Can anyone guide me on how I would do this? Much appreciated if you could.

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108493)
 * Someone help please?
 *  [nazcar](https://wordpress.org/support/users/nazcar/)
 * (@nazcar)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108497)
 * what is the code for the video title?
    just put them together inside a div title
   class..
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108502)
 * I don’t get you. The whole form code looks like this
 *     ```
       <form name="post" method="post">
   
       <div class="wrap">
       <div id="poststuff">
       <div id="post-body">
   
       <div class="postbox">
       <h3><label for="title">Name of Anime/Movie Category (i.e. Naruto, Bleach, One Piece):</label></h3>
       <div class="inside">
       <?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'category', 'orderby' => 'id', 'hierarchical' => 1, 'tab_index' => 1 ) ); ?>
       </div>
       </div>
   
       <div class="postbox">
       <h3>Episode or Part: <small>(If Anime then TYPE "Episode 3", If Movie then TYPE "Part 1", ETC.)</small></h3>
       <div class="inside">
       <input type="text" name="partepisode" size="30" tabindex="2" value="<?php echo htmlspecialchars($_POST['partepisode']);?>" id="partepisode"  style="width: 98%;"/>
       </div>
       </div>
   
       <div class="postbox">
       <h3>Video Description:</h3>
       <div class="inside">
       <textarea id="description" tabindex="2" name="description" cols="40" rows="3" style="width: 98%;"/>
       <?php echo htmlspecialchars($_POST['description']);?>
       </textarea>
       </div>
       </div>
   
       <div class="postbox">
       <h3>Genres: <small>seperated by comma's</small></h3>
       <div class="inside">
       <input type="text" name="tags" size="30" tabindex="4" value="<?php echo htmlspecialchars($_POST['tags']);?>" id="tags"  style="width: 98%;"/>
       </div>
       </div>
   
       <div class="postbox">
       <h3>Thumbnail URL: <small> If you use Mozilla: Just RIGHT click the image and select "Copy Image Location" and paste here</small></h3>
       <div class="inside">
       <input type="text" name="thumb" size="30" tabindex="5" value="<?php echo htmlspecialchars($_POST['thumb']);?>" id="thumb"  style="width: 98%;"/>
       </div>
       </div>
   
       <div class="postbox">
       <h3>Embed Code: <small> ANDAnime video sizes are ALWAYS 600x400! (Change all "width=number" to "width=600" - Change all "height=number" to "height=400"</small></h3>
       <div class="inside">
       <textarea id="embed" tabindex="6" name="embed" cols="40" rows="2" style="width: 98%;"/>
       <?php echo stripslashes(htmlspecialchars($_POST['embed']));?>
       </textarea>
       </div>
       </div>
   
       </div>
       </div>
   
       <input type="hidden" name="submit" value="submit">
       <input type="submit" name="submit" value="Submit">
   
       </form>
       ```
   
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108503)
 * So how do I get to to set the title to what the category and and video part is?
   like for an example the category is Caramel because I selected it, and I typed
   Apple for the input. When I submit the form how do I combine both and get the
   title to be Caramel Apple?
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108511)
 * Please someone?
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108515)
 * No one seriously knows!?!?
 *  [vageez](https://wordpress.org/support/users/vageez/)
 * (@vageez)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108516)
 * can u put up a link
 * so I can see?
 *  [mercuryfenix](https://wordpress.org/support/users/mercuryfenix/)
 * (@mercuryfenix)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108517)
 * If you have a post value for each it would be something like:
    `$category_and_title
   = $_POST['category'] . $_POST['title'];` What’s so difficult about that? You 
   state your problem so vague, what specifically are you not understanding?
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108531)
 * I’ve never touched PHP before and this is my first time playing with it..
 * it’s not working though..
    `<?php $title = $_POST['category'] . $_POST['title'];?
   >`
 *  [mercuryfenix](https://wordpress.org/support/users/mercuryfenix/)
 * (@mercuryfenix)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108535)
 * That was an example, I dont know what your post indexes are. look for the input
   names
    `<?php $title = $_POST[' (insert category's input name here) '] . $_POST['(
   insert title's input name here) '];?>`
 * If you don’t have experience with php you should consider hiring somebody else
   who does. This is a very basic php concept. Learn about it here:
    [http://www.w3schools.com/php/php_post.asp](http://www.w3schools.com/php/php_post.asp)
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108537)
 * It still doesn’t work.
 * `<?php $_title = $_POST['category'] . $_POST['partepisode'];?>`
 * It checks if the user put anything
 *     ```
       <?php
               if(isset($_POST['submit'])){
                       if($_POST['embed'] == ''){
                               echo '<div class="updated" id="message" style="background-color: rgb(255, 251, 204);"><p><strong>You should enter a valid embed-code</strong></div>';
                       }
   
                       if($_POST['thumb'] == ''){
                               echo '<div class="updated" id="message" style="background-color: rgb(255, 251, 204);"><p><strong>You should enter a valid thumbnail URL</strong></div>';
                       }
   
                       if($_POST['title'] == ''){
                               echo '<div class="updated" id="message" style="background-color: rgb(255, 251, 204);"><p><strong>You should enter a title</strong></div>';
                       }
   
       				if($_POST['partepisode'] == ''){
                               echo '<div class="updated" id="message" style="background-color: rgb(255, 251, 204);"><p><strong>You should enter a part or episode number</strong></div>';
                       }
       	}
       ```
   
 * and it gives me “You should enter a title” problem. =[ sigh I’ve been at this
   for hours.
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108538)
 * Would this possibly work
 * <?php $POST[‘title’] = $_POST[‘category’] . $_POST[‘partepisode’];?>
 *  [mercuryfenix](https://wordpress.org/support/users/mercuryfenix/)
 * (@mercuryfenix)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108541)
 * you aren’t showing any understanding of php. read through the lessons on w3shools.
   com and you should be able to do this
 *  Thread Starter [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * (@tonynooblet)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108542)
 * Ugh.. starting from where?

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Setting Post Title’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 14 replies
 * 4 participants
 * Last reply from: [tonynooblet](https://wordpress.org/support/users/tonynooblet/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/setting-post-title/#post-1108542)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
