While loop inside another while loop

I would create a custom query for each nested loop and loop on its post data. Similar to what is written about here. You will probably need to save the post global to a temporary variable so it can be set back ( setup_postdata() ) at the end of the nested look.

Add image custom attribute [closed]

You need to use the hooks attachment fields to edit / save to ad and save the fields. function add_attachment_field_credit( $form_fields, $post ) { $form_fields[‘paper-type’] = array( ‘label’ => ‘Paper type’, ‘input’ => ‘text’, ‘value’ => get_post_meta( $post->ID, ‘paper_type’, true ), ‘helps’ => ‘Photo paper type’ ); return $form_fields; } add_filter( ‘attachment_fields_to_edit’, ‘add_attachment_field_credit’, 10, 2 … Read more

WooCommerce – Complete Order when an action occurs

Remove return; from your code, which is prematurely exiting the function before the following two lines can be executed; that is why the status is not changed. function my_change_status_function () { global $post; $ordernumber = get_post_meta( $post->ID, ‘order_number’, true ); $audit_status = get_post_meta( $post->ID, ‘audit_status’, true ); if ( $audit_status == ‘Complete’ ) { $order … Read more

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