Title: Alphard's Replies | WordPress.org

---

# Alphard

  [  ](https://wordpress.org/support/users/alphard/)

 *   [Profile](https://wordpress.org/support/users/alphard/)
 *   [Topics Started](https://wordpress.org/support/users/alphard/topics/)
 *   [Replies Created](https://wordpress.org/support/users/alphard/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/alphard/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/alphard/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/alphard/engagements/)
 *   [Favorites](https://wordpress.org/support/users/alphard/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Pre-filling custom fields on New Post](https://wordpress.org/support/topic/pre-filling-custom-fields-on-new-post-1/)
 *  Thread Starter [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [11 years ago](https://wordpress.org/support/topic/pre-filling-custom-fields-on-new-post-1/#post-6504277)
 * So here’s the solution, for future reference:
 *     ```
       /**
        * Preset a custom field for new posts
        *
        * @link http://wordpress.stackexchange.com/a/200554/26350
        */
       add_action( 'save_post_post', function( $post_ID )
       {
           if( 'auto-draft' === get_post_status( $post_ID )
               &&  post_type_supports( get_post_type( $post_ID ), 'custom-fields' )
           )
               add_post_meta( $post_ID, 'wpse_custom_field', '123' );
       } );
       ```
   
 * [http://wordpress.stackexchange.com/a/200554/78801](http://wordpress.stackexchange.com/a/200554/78801)
 * I’d prefer to use the built-in custom fields functionality, rather than build
   it myself.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: SpeakUp! Email Petitions] Plugin language](https://wordpress.org/support/topic/plugin-speakup-email-petitions-plugin-language/)
 *  Thread Starter [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-speakup-email-petitions-plugin-language/#post-3253029)
 * That works, thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] [Plugin: Custom sidebars] Custom Sidebars: Oficial Topic](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/)
 *  [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/page/3/#post-1640951)
 * Okay, added wp_head() and it now works. Awesome, thanks. This is the first wordpress
   theme I’m creating, so I didn’t know what exactly wp_head() was for, since widgets
   worked so far without it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] [Plugin: Custom sidebars] Custom Sidebars: Oficial Topic](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/)
 *  [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/page/3/#post-1640949)
 * > In the last version the hook used to replace sidebars has changed
 * Do you mean in the last version of wordpress (3.0.5)? What is this hook?
 * The theme is one which I’m developing now, but it’s not publicly available yet.
   I’m just using the register_sidebar() function to register a single sidebar and
   then call it using dynamic_sidebar(). So that’s all the sidebar code in the theme,
   really.
 * I tried v0.7.1 of the plugin, the sidebars will not appear and replace the default
   registered sidebar, whereas v0.5/0.6 of the plugin works properly in the same
   theme.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] [Plugin: Custom sidebars] Custom Sidebars: Oficial Topic](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/)
 *  [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/page/3/#post-1640946)
 * Also checked with v0.6, it works. It’s only when I upgrade to 0.7.1 that it stops
   working (all custom sidebars disappear and are replaced by the default one, even
   though the setup is there, in the admin panel). When I revert to v0.6 (or 0.5)
   they re-appear.
 * Sorry I’m not giving any more specifics, but I don’t know what to look for. Ask
   if you have any questions on the setup.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] [Plugin: Custom sidebars] Custom Sidebars: Oficial Topic](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/)
 *  [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-custom-sidebars-custom-sidebars-oficial-topic/page/3/#post-1640945)
 * Hey, there appears to be some problem with the new version of Custom Sidebars.
   A while ago I installed v0.5 on a custom theme I’m developing and it worked fine,
   but when I updated to 0.7, all sidebars disappeared from the pages. I checked
   the setup in the admin panel and it all seems fine (haven’t made any changes).
   Then I removed all the files of the v0.7 plugin and put in the files of v0.5 
   and it works again.
 * Any ideas what might be wrong?
 * P.S. I’m using wordpress 3.0.5
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to remove the default css classes](https://wordpress.org/support/topic/how-to-remove-the-default-css-classes/)
 *  Thread Starter [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [16 years ago](https://wordpress.org/support/topic/how-to-remove-the-default-css-classes/#post-1655581)
 * Anyone?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Pages organisation and menu](https://wordpress.org/support/topic/pages-organisation-and-menu/)
 *  Thread Starter [Alphard](https://wordpress.org/support/users/alphard/)
 * (@alphard)
 * [16 years ago](https://wordpress.org/support/topic/pages-organisation-and-menu/#post-1654997)
 * This works, thanks.

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