Add image to post

Hey I had the same problem about 4 5 days , until I found this code , try some tweaks and see if works 🙂 #Upload and Create attachment if (!function_exists(‘wp_generate_attachment_metadata’)){ require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/media.php’); } $upload = wp_upload_bits( $_FILES[‘file’][‘name’], null, file_get_contents( $_FILES[‘file’][‘tmp_name’] ) … Read more

Add HTML between feed items

you can add some code to the bottom of each feed post, this would give you the desired result. You can add this code to your functions.php or add it as a plugin /** Add custom feed content footer * @param $content * @return string */ function add_feed_content($content) { if(is_feed()) { $post_type = get_post_type( get_the_ID() … Read more