Missing argument 2 for a custom function widgets_init

widgets_init isn’t a function, it’s an action hook. The callback you specify for that hook is generate_sidebars which requires two parameters, but the widgets_init hook doesn’t pass any parameters to its callbacks. I think what you’re trying to do is this: add_action( ‘widgets_init’, ‘call_sidebar_function’ ); Which will call the call_sidebar_function() function which will then call … Read more

Unregister sidebar from Child-Theme

Check the code bellow, I think that should work. add_action( ‘after_setup_theme’, ‘remove_default_sidebars’, 11 ); function remove_default_sidebars(){ remove_action( ‘widgets_init’, ‘starkers_widgets_init’ ); }

Dynamic Sidebars On Multiple Subpages

More easy & elegant (higher maintainability): <?php // Your sidebar should have the wp_meta action hook wp_meta(); // in ex. your functions.php function my_sidebar_content() { // “About” Page if ( is_page(‘about’) ) { // If some widget is added via Admin > Design > Widgets if ( is_active_sidebar( ‘widgets-sidebar-default’ ) ) { // Display Widgets … Read more

How can I hide the sidebar from a specific post?

Here’s an idea I mentioned on Twitter. function special_post_template( $template ) { // Identify a single query for the special post if ( is_single() && 10 == get_the_ID() ) $template = get_template_directory() . ‘/special-single.php’; return $template; } add_filter( ‘template_include’, ‘special_post_template’ );

Styling images coming from another blog

Calling image_resize() would be difficult, since it would search for the image in your main blog’s upload directory. If it is a fixed image size I would just add it to the configuration of your photoblog, so it is created there when you upload new images (you can then rebuild your old image thumbnails). In … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)