How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?

take a look at the reference docs for the WP_Query class: http://codex.wordpress.org/Class_Reference/WP_Query something like this: $args = array( //some key/value pairs…whatever ‘meta_query => array( array( ‘key’ => somekey, ‘value’ => somevalue, ‘compare’ => some comparison operator ), array( ‘key’ => some other key, ‘value’ => some other value, ‘compare’ => some comparison operator ) ) … Read more

How do you add a custom option to user data?

To add a field to the profile/user edit page you need to use the edit_user_profile hook and show_user_profile hook so: add_action( ‘show_user_profile’, ‘my_extra_user_fields’ ); add_action( ‘edit_user_profile’, ‘my_extra_user_fields’ ); function my_extra_user_fields( $user ) { ?> <h3>User avatar</h3> <table class=”form-table”> <tr> <th><label for=”user_avatar”>User avatar</label></th> <td> <input id=”user_avatar” name=”user_avatar” type=”text” value=” <?php $user_avatar = get_the_author_meta( ‘user_avatar’, $user->ID ); … Read more

Arrange custom fields with drag and drop?

In this example of repeatable custom fields, we can see that the following jQuery is needed: $(‘#repeatable-fieldset-one tbody’).sortable({ opacity: 0.6, revert: true, cursor: ‘move’, handle: ‘.sort’ }); And the HTML it controls is (simplified): <table id=”repeatable-fieldset-one” width=”100%”> <thead> <tr> <th width=”2%”></th> <th width=”30%”>Name</th> <th width=”60%”>URL</th> <th width=”2%”></th> </tr> </thead> <tbody> <?php if ( $repeatable_fields ) … Read more

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