Too few arguments for printf() [closed]

printf( __( ‘%1$s – %2$s’, ‘erudite’ ), the_date( ”, ”, ”, true ) ) expects two strings; you’ve only offered one (the_date()). If you want to use two strings, you have to give it two strings. If you want printf() to use the_time() and $previousday, you need to tell it so: printf( __( ‘%1$s – … Read more

WordPress Error Missing Argument [duplicate]

That plugin is using outdated code. $wpdb->prepare used to allow the second parameter to be omitted, though using prepare without it never really made since. As of 3.5 the second parameter is required. You will need to update the plugin, if there is an update, or hack the plugin yourself which is prone to cause … Read more

Get post title by Alphabet

You have two problems. First need to global $wpdb;. Then you are using the_title() and the_permalink() both of which automatically echo out a value. So you need to switch them to get_the_title() and get_permalink(). function get_post_by_alphabet($the_char){ global $wpdb; $first_char = $the_char; $postids=$wpdb->get_col($wpdb->prepare(” SELECT ID FROM $wpdb->posts WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s ORDER BY $wpdb->posts.post_title”,$first_char)); if ($postids) … Read more

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