How to enable [archives] short code

I don’t know or understand why, but I pasted this into wp-content/themes/twentysixteen/functions.php and it worked: function wpse61674_archives_shortcode_cb( $atts ) { return ‘<h2 class=”widget-title”>Archives</h2><ul>’.wp_get_archives(array(‘format’=>’html’,’echo’=>false,’type’=>’yearly’)).'</ul>’; } add_shortcode( ‘archives’, ‘wpse61674_archives_shortcode_cb’ ); I found this code somewhere on the internet, but it wasn’t part of the wordpress documentation on archives shortcode.

users post count

The count_user_posts accepts array as the $post_type arguments. You don’t need to include the $post_type = part. $user_posts = count_user_posts( $userid, array(‘post’,’blog’,’lettura’,’intervista’) ); The $user_posts variable will hold the number of posts for the $userid.

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