Alphard
Forum Replies Created
-
Forum: Hacks
In reply to: Pre-filling custom fields on New PostSo 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
I’d prefer to use the built-in custom fields functionality, rather than build it myself.
Forum: Plugins
In reply to: [Plugin: SpeakUp! Email Petitions] Plugin languageThat works, thanks.
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.
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.
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.
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
In reply to: How to remove the default css classesAnyone?
Forum: Fixing WordPress
In reply to: Pages organisation and menuThis works, thanks.