WordPress.org

Ready to get started?Download WordPress

Forums

Adding Custom Fields to Press This (3 posts)

  1. mattsaler
    Member
    Posted 4 years ago #

    [I originally posted this in How-To and Troubleshooting, but realized it might be better to post it here. ] [moderated - deleted that other topic]

    http://onthewingsblog.com/

    I'm wondering if it's possible any more to add custom fields through press-this.php. I tried the solution posed here (the Stansbury part, specifically), but something must have changed since that was first put out, so I end up getting a broken layout to Press This when I try it.

    I just want to be able to use this plugin (which does work) in conjunction with Press This, which I've started using for short posts after the Daring Fireball model. That external link plugin's basically useless to me if I have to use the regular posting functionality rather than the much more convenient Press This bookmarklet.

    I'm not a developer, so updating Stansbury's hack is beyond my skill. And updating it isn't really what I want to do: I want to add the full Custom Fields section to press-this.php. Can anyone help with that? Thanks in advance.

  2. mattsaler
    Member
    Posted 4 years ago #

    Bump. Anyone? I can't be the only person who's wanted to change the Press This panel...

  3. modtang
    Member
    Posted 3 years ago #

    It's actually pretty easy to do. I just threw together the code to attach Twitter Tools to it. You need the press-this.php file, the plugin file of what you want to add to it and you need to isolate the relevant code from that plugin file. Here's what I did as an example.

    <!-- Post to Twitter Start (Experimental) -->
    			<div id="tagsdiv-post_tag" class="stuffbox" >
    				<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
    					<br />
    				</div>
    				<h3><span><?php _e('Send To Twitter'); ?></span></h3>
    				<div class="inside">
    					<div class="tagsdiv" id="post_tag">
    						<p>
    						<input name="aktt_notify_twitter" id="aktt_notify_twitter_yes" value="yes" checked="checked" type="radio"> <label for="aktt_notify_twitter_yes">Yes</label>
    						&nbsp;&nbsp;<input name="aktt_notify_twitter" id="aktt_notify_twitter_no" value="no" type="radio"> <label for="aktt_notify_twitter_no">No</label>
    						</p>
    						<p>
    						<label for="_aktt_hash_meta">#hashtags:</label>
    						<input id="_aktt_hash_meta" name="_aktt_hash_meta" value="#yourhashtag" type="text">
    						</p>
    					</div>
    				</div>
    			</div>
    	<!-- Post to Twitter End (Experimental) -->

    I just copied the Tags box and replaced the form elements with those from Twitter Tools. I put the new code under the Tags box and uploaded. It works exactly as it does in full post view.

    Hope this helps a little. :)

Topic Closed

This topic has been closed to new replies.

About this Topic