Problem creating an array instance in a widget in 4.4 update

Problem solved! Still don’t know what has changed in the 4.4 update though. Prior to 4.4, you can use the square brackets reverted to generate an array instance, like that: <select multiple=”multiple” name=”<?php echo $this->get_field_name(‘cats][‘) ?>”> //$instance[‘cats’] = array(); Starting from 4.4, you can use square brackets in regular case, like that: <select multiple=”multiple” name=”<?php … Read more

Create an extra Widget Areas in WordPress TwentyTwelve

You can create new sidebar areas by adding the following code to your theme’s functions.php register_sidebar( array( ‘name’ => __( ‘Content Sidebar’, ‘mytheme’ ), ‘id’ => ‘sidebar-2’, ‘description’ => __( ‘Sidebar description’, ‘mytheme’ ), ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</aside>’, ‘before_title’ => ‘<h3 class=”widget-title”>’, ‘after_title’ => ‘</h3>’, ) ); You can change … Read more

How to modify single widget in child theme?

Looks like I’ve found the answer here. Here’s the working version of the code I’m using in my child theme’s functions.php file. function my_widgets_init() { register_sidebar( array( ‘name’ => esc_html__( ‘Default Sidebar’, ‘codilight-lite’ ), ‘id’ => ‘sidebar-1’, ‘description’ => ”, ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</aside>’, ‘before_title’ => ‘<h2 class=”widget-title”><span>’, ‘after_title’ => … Read more

Trying to create dynamic widget area using post ID

In your code you are trying to register a different sidebar for every post. Now, that would be possible (though with slightly different code), but it would mean that if you have, say, a hundred posts, you would have hundred widget areas in your admin, all of which you would have to fill with different … Read more

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