• I’m afraid I’m a complete newbie to hacking wordpress (although not to coding more generally), so I’m sorry if this question has an obvious answer.

    I’d like to add a text field to the top of my site to allow logged-in users to write very quick blog posts (ideally in a default category).

    The code in Prologue that displays the form is (I’ve removed a couple of minor things just to make it clearer):

    <?php
    $user			= get_userdata( $current_user->ID );
    $first_name		= attribute_escape( $user->first_name );
    ?>
    
    <div id="postbox">
    	<form id="new_post" name="new_post" method="post" action="<?php bloginfo( 'url' ); ?>/">
    		<input type="hidden" name="action" value="post" />
    		<?php wp_nonce_field( 'new-post' ); ?>
    
    		<label for="posttext">Whatcha up to?</label>
    		<textarea name="posttext" id="posttext" rows="3" cols="60"></textarea>
    
    		<label for="tags">Tag it</label>
    		<input type="text" name="tags" id="tags" autocomplete="off" />
    
    		<input id="submit" type="submit" value="Post it" />
    	</form>
    </div> <!-- // postbox -->

    But placing this code on the page doesn’t seem to work. The form is displayed but submitting it does nothing. What do I need to do to get it to work properly?

    Best wishes,

    Nicholas

Viewing 1 replies (of 1 total)
  • There is some more post related code at the top of ‘Main Index Template’ (index.php) too. I’m new to this as well, but it’s that which seems to be doing most of the heavy lifting (creating a title for the post, etc.) before passing it on to wordpress.

    If including that as well still doesn’t work as expected, I guess there could be post related code in ‘Theme Functions’ (functions.php) too – although I can’t see anything obviously vital in there.

    Ben

Viewing 1 replies (of 1 total)

The topic ‘Adding a Prologue-like edit box’ is closed to new replies.