Title: P2 customization
Last modified: August 19, 2016

---

# P2 customization

 *  [Mathias](https://wordpress.org/support/users/stoupoun/)
 * (@stoupoun)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/p2-customization/)
 * Hi everyone,
    I am using the P2 theme on my self-hosted blog, and although I 
   have already done a bit of CSS theme customization, not being a php/javascript
   expert, I am struggling to do 2 big changes I would really like to implement:
 * #1 Add the ability to play a sound (Ding!) when a new post/comment is added… 
   I presume that should be possible since there are a few actions that appear to
   take place after the Ajax posting (number count increase on the tab for example),
   but I don’t know how…
 * #2 Enable posting by just hitting Return instead of having to click on the “Post
   It” button. You could still add forced line breaks in your post by using Shift
   +Return, but it seems a shame to have so many keyboard shortcuts available, and
   not this quick posting one.
 * Would any of you script wizards be able to help me out?
    Many thanks in advance!
   Cheers, Mathias

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

 *  [Archie Webmaker](https://wordpress.org/support/users/weblogian/)
 * (@weblogian)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/p2-customization/#post-1058114)
 * Here is a custom theme of P2, Check it out
    [http://twitpost.blogcastor.com/](http://twitpost.blogcastor.com/)
 *  Thread Starter [Mathias](https://wordpress.org/support/users/stoupoun/)
 * (@stoupoun)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/p2-customization/#post-1058137)
 * Well, this is nice, but not exactly the help I was asking for!
 *  Thread Starter [Mathias](https://wordpress.org/support/users/stoupoun/)
 * (@stoupoun)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/p2-customization/#post-1058153)
 * For #2, looking around the various files for the theme, I believe it should be
   possible to modify /inc/p2.js keyboard navigation section, but I really don’t
   know enough javascript to do this myself.
 * If I look at the code for the “c” shortcut, would simply replacing `$("#posttext").
   focus();` by `$("#submit").focus();` be enough for example, to enable posting
   the content of the text box when Return is pressed? I suspect it is not that 
   easy, but… How about setting up an additional shortcut for something like Ctrl
   +Return to activate the Post It button?
 *  [bhomatude](https://wordpress.org/support/users/bhomatude/)
 * (@bhomatude)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/p2-customization/#post-1058231)
 * I’m trying to change the width of the container and am not having any luck. I’ve
   got this embedded within another site and so have disabled the header and sidebar,
   but can’t seem to figure out how to get this down to 645px width. Any help? thanks.
 *  [bhomatude](https://wordpress.org/support/users/bhomatude/)
 * (@bhomatude)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/p2-customization/#post-1058232)
 * nevermind. found it… in functions.php

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

The topic ‘P2 customization’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 5 replies
 * 3 participants
 * Last reply from: [bhomatude](https://wordpress.org/support/users/bhomatude/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/p2-customization/#post-1058232)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
