How to change the post form from plugin?

If you want to change/add something to post form, you have to deal with meta boxes. I would recommend you to read through these articles: Reusable Custom Meta Boxes Part 1: Intro and Basic Fields Reusable Custom Meta Boxes Part 2: Advanced Fields Reusable Custom Meta Boxes Part 3: Extra Fields Reusable Custom Meta Boxes … Read more

How to use a WooCommerce action hook?

If you don’t intend your meta field to be specific to a particular product type you can do the following ( which is what I do in my own WooCommerce extension ). function new_post_meta () { if (isset($_POST[‘location’])) update_post_meta( $post_id, ‘location’, json_encode($_POST[‘location’]) ); } add_action( ‘woocommerce_process_product_meta’, ‘new_post_meta’ ); or to limit this to a particular … Read more

Why can’t I call a (member) function from within a foreach?

You use $mediatags variable in global scope as array in your loop, and then try to use the same variable as object in your function. You override your global $mediatags variable in your loop. Try to use following code: foreach($new_name_for_mediatags_array as $mediatag){ $args=”media_tags=animals&numberposts=10&return_type=li&size=thumbnail”; $media_items = get_attachments_by_media_tags($args); echo $media_items; };

Not One ‘Contact Form Plugin’ will send email // Work

Disable all other plugins. Use the default theme. Try again. If it doesn’t send, try sending to a different (eg gmail) address. If that still doesn’t work, verify that sendmail is installed. If it is, check and see if a basic sendmail php script will work. If that still doesn’t work or sendmail isn’t installed, … Read more