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

How do I include the sidebar (with Widgets) in a custom theme?

Your issue is the dynamic sidebar being called is not matching the ID of what is registered. Matching: <?php if ( is_active_sidebar( ‘sidebar-widgets’ ) ) : ?> <div id=”secondary” class=”widget-area” role=”complementary”> <?php dynamic_sidebar( ‘sidebar-widgets’ ); ?> </div><!– #secondary –> <?php endif; ?> Register Sidebar if (function_exists(‘register_sidebar’)) { register_sidebar(array( ‘name’ => ‘Sidebar Widgets’, ‘id’ => ‘sidebar-widgets’, … Read more

Woocommerce quick checkout form [closed]

I got it by using wc_create_order here is the full code `if ( isset( $_POST[‘submitted’] ) ) { $address = array( ‘first_name’ => $_POST[‘fullname’], ’email’ => $_POST[’email’], ‘phone’ => $_POST[‘phone’], ‘address_1’ => $_POST[‘address’], ‘city’ => $_POST[‘city’], ); $order = wc_create_order(); $order->add_product( get_product( get_the_id() ), $_POST[‘quantity’] ); $order->set_address( $address, ‘billing’ ); $order->set_address( $address, ‘shipping’ ); $order->set_payment_method( … Read more

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