<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>WordPress DK Forum Topic: Upload af billede fra custom form/PHP</title>
		<link>http://wp-danmark.dk/forum/topic/upload-af-billede-fra-custom-formphp</link>
		<description>WordPress DK Forum Topic: Upload af billede fra custom form/PHP</description>
		<language>da-DK</language>
		<pubDate>Sun, 09 Aug 2026 12:20:31 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Søg]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://wp-danmark.dk/forum/search.php</link>
		</textInput>
		<atom:link href="http://wp-danmark.dk/forum/rss/topic/upload-af-billede-fra-custom-formphp" rel="self" type="application/rss+xml" />

		<item>
			<title>Kristianc om "Upload af billede fra custom form/PHP"</title>
			<link>http://wp-danmark.dk/forum/topic/upload-af-billede-fra-custom-formphp#post-67222</link>
			<pubDate>ons, 15 mar 2017 11:41:07 +0000</pubDate>
			<dc:creator>Kristianc</dc:creator>
			<guid isPermaLink="false">67222@http://wp-danmark.dk/forum/</guid>
			<description>&#60;p&#62;Det kan jeg sgutte finde ud af... Kan du hjælpe mig videre eller?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Finnj om "Upload af billede fra custom form/PHP"</title>
			<link>http://wp-danmark.dk/forum/topic/upload-af-billede-fra-custom-formphp#post-67204</link>
			<pubDate>søn, 12 mar 2017 09:29:47 +0000</pubDate>
			<dc:creator>Finnj</dc:creator>
			<guid isPermaLink="false">67204@http://wp-danmark.dk/forum/</guid>
			<description>&#60;p&#62;Nedenstående er til featured image, men det kan få dig startet:&#60;/p&#62;
&#60;p&#62;Input form:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
echo &#34;Upload featured image&#60;br /&#62;&#34;;&#60;br /&#62;
echo '&#38;lt;input type=&#34;file&#34; name=&#34;thumbnail&#34; id=&#34;thumbnail&#34;&#38;gt;&#60;br /&#62;';&#60;br /&#62;
echo &#34;Not uploaded until post is saved&#34;;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Kode til at gemme featured image&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
if ($_FILES &#38;amp;&#38;amp; array_key_exists('thumbnail', $_FILES) &#38;amp;&#38;amp; $_FILES['thumbnail']['error'] === UPLOAD_ERR_OK )&#60;br /&#62;
	{&#60;br /&#62;
	//echo print_r($_FILES, true);&#60;/p&#62;
&#60;p&#62;	$attach_id	= 0;&#60;br /&#62;
	if (!function_exists('wp_generate_attachment_metadata'))&#60;br /&#62;
		{&#60;br /&#62;
		require_once(ABSPATH . &#34;wp-admin&#34; . '/includes/image.php');&#60;br /&#62;
		require_once(ABSPATH . &#34;wp-admin&#34; . '/includes/file.php');&#60;br /&#62;
		require_once(ABSPATH . &#34;wp-admin&#34; . '/includes/media.php');&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;	$attach_id = media_handle_upload( 'thumbnail',  $postid );&#60;/p&#62;
&#60;p&#62;	if ($attach_id &#38;gt; 0)&#60;br /&#62;
		update_post_meta( $postid,'_thumbnail_id',$attach_id);&#60;/p&#62;
&#60;p&#62;	}&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kristianc om "Upload af billede fra custom form/PHP"</title>
			<link>http://wp-danmark.dk/forum/topic/upload-af-billede-fra-custom-formphp#post-67202</link>
			<pubDate>lør, 11 mar 2017 21:37:35 +0000</pubDate>
			<dc:creator>Kristianc</dc:creator>
			<guid isPermaLink="false">67202@http://wp-danmark.dk/forum/</guid>
			<description>&#60;p&#62;Hej&#60;/p&#62;
&#60;p&#62;Jeg søger en der kan hjælpe mig med at få billede upload til at virke i min egen custom page/PHP
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
