Support » Plugins » Editing the post box

  • Hi there!

    I want to use the P2 theme,, but I want to extend the post box.

    I need two boxes – one to tell people ‘put url here’ and then another for ‘description’, however, when they click post, I want it to then post it all as one post, if you will?

    The reason being, the url will be a link to an MP3 which will convert to a player and then there will be the description of the track 🙂

    Hope you can help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Are you talking about posting from the backend or is this something your theme is showing on the front end?

    Hi apljdi,

    There is a post box, almost like Facebook, on the front end. Checkout the demo of the theme at

    Hope you can help bud!

    Ok. That only shows up when you are logged in.

    Are you uploading the MP3s to your server of just linking to them? Linking is certainly easier, but either way you are going to have to do some theme editing. Start by digging through P2 and find where that form is created.

    just inserting a link, I’ll be using that 1bit audio convertor which turns the link into a player. then the second box to be the description 🙂

    Ok I’ve looked in the post form and I’ve got this :

    <textarea name=”posttext” id=”posttext” tabindex=”1″ rows=”1″ cols=”60″></textarea>

    This is what makes the box which I can post with.

    This makes the post title however, so it won’t convert to an mp3 player or what not.
    Is there a way to add an extra box that would make the post content?


    That’s only part of the form. By itself that won’t do anything but make a box on the screen. You need the part that starts with <form and ends with </form>. Also, you need to be looking at the .php source, not at the browser’s ‘view source’ output. I can’t tell from what you’ve posted which you are looking at but the fact that there is no PHP in there makes me think its generated html source, not PHP source.

    there is a an extra file called post-form.php in the theme which is where I’ve got that from.

    Thanks for helping bud, I’m not very key’d up on this sort of stuff! =D

    Ok. In P2’s functions.php there is a function called prologue_new_post(). That looks like what is doing your post insertion. Once you create your new field, you should have another $_POST value, say $_POST[‘videourl’] that you can fuse into the $post_content before this line: $post_id = wp_insert_post( array(. You’ll have to fiddle with formatting, I’m sure. Also dig around that functions.php. There are serveral functions that deal with posting/post editing. You may have to modify more than one of them.

    I am trying to put two custom fields for uploading audio as well as thumbnail but the files are not getting upload on the specified location.
    And I don’t want to use any plug-in. This is a type of custom coding.

    Thanks In Advance

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Editing the post box’ is closed to new replies.