How to use get_post_custom function on the blog page?

The basic problem is that there is no variable $post in your header.php. That variable might exist in the global scope, but your code operates in a function scope of load_template() which was called by get_header(). So you have four options: Import the global variable into your function with the global keyword. global $post; // … Read more

WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types

The file types that you have specified ‘application/msword’, ‘application/vnd.ms-excel’, ‘application/pdf’ are already supported by media uploader. To see the default supported mime file types, call wp_get_mime_types() function. Use upload_mimes filter as shown in following code to make media uploader to accept files types other than the default. Add following code in your themes functions.php file … Read more

Users Select inside custom metabox

I think the problem is you are passing the WP_User_Query object, not the results of the query. Try to change: $fields = array( array( ‘id’ => $prefix . ‘user_sub’, ‘name’ => ‘Subscriber User’, ‘type’ => ‘select’, ‘use_ajax’ => false, ‘options’ => $user_query, // this is where you populate the select in metabox ), ); To: … Read more

Image media upload metabox

In your JS you have twice the call to $(‘#dd_image’)and in your HTML you have no input named dd_image, but dd_image_one and dd_image_two… And also in your HTML you have twice id=”upload_image_button”and it’s bad :-). This way when you click on the first or the second button you do the same exact call and modify … Read more

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