WP Marketing » Tag: get_post_custom_values - Recent Posts http://wpmarketing.org/forum/tags/get_post_custom_values Wordpress for Internet and Affiliate Marketing en-US Sat, 21 May 2011 18:25:39 +0000 http://bbpress.org/?v=1.0.2 <![CDATA[Search]]> q http://wpmarketing.org/forum/search.php gravel22 on "Add video in post with a url" http://wpmarketing.org/forum/topic/add-video-in-post-with-a-url#post-109 Wed, 20 Jan 2010 17:37:24 +0000 gravel22 109@http://wpmarketing.org/forum/ <p>Thank you this is really great and complete answer, </p> <p>Have a good day ! </p> hanadaddy on "Add video in post with a url" http://wpmarketing.org/forum/topic/add-video-in-post-with-a-url#post-104 Tue, 19 Jan 2010 23:40:40 +0000 hanadaddy 104@http://wpmarketing.org/forum/ <p>Hello, nice website.</p> <p>Yes you can use custom fields and use as the video file.</p> <p>First add below routine in your theme&#39;s <code>single.php</code> file. Make sure you add below lines after <code>the_post();</code> is called.<br /> The custom field from the post is only accessible after <code>the_post()</code> is called.</p> <p>Note that I used &#39;video&#39; as the custom field name to remember easily.</p> <pre> &lt;?php $tarray= get_post_custom_values(&#39;video&#39;); if (isset($tarray[0])) { $video=$tarray[0]; } echo &quot;video:$video&quot;; if (function_exists(&#39;hana_flv_player_template_call&#39;)){ $hana_arg=&quot; video=&#39;$video&#39; player=&#39;2&#39; width=&#39;180&#39; height=&#39;150&#39; more_2=\&quot;showStopButton: false, showScrubber: false, showVolumeSlider: false,showMuteVolumeButton: false, showFullScreenButton: false, showMenu: false, controlsOverVideo: &#39;locked&#39;,controlBarBackgroundColor: -1, controlBarGloss: &#39;none&#39;, usePlayOverlay:false \&quot; &quot;; echo hana_flv_player_template_call($hana_arg); } ?&gt; </pre> <p>Then you will update the post and add the custom field with name <code>video</code> and the value which should be the URL of the video file.</p> <p>Then visit the website!</p> <p>See the below screen capture for better explanation. Picture worth better than thousand words.</p> <p> <a class='bb_attachments_link' href='http://wpmarketing.org/forum/?bb_attachments=104&bbat=10'><img src='http://wpmarketing.org/forum/?bb_attachments=104&bbat=10&inline' /></a> <a class='bb_attachments_link' href='http://wpmarketing.org/forum/?bb_attachments=104&bbat=11'><img src='http://wpmarketing.org/forum/?bb_attachments=104&bbat=11&inline' /></a> <a class='bb_attachments_link' href='http://wpmarketing.org/forum/?bb_attachments=104&bbat=12'><img src='http://wpmarketing.org/forum/?bb_attachments=104&bbat=12&inline' /></a> </p> gravel22 on "Add video in post with a url" http://wpmarketing.org/forum/topic/add-video-in-post-with-a-url#post-97 Tue, 19 Jan 2010 01:08:35 +0000 gravel22 97@http://wpmarketing.org/forum/ <p>Hi !</p> <p>First I'll thank you for the great flv player, really class all the way, thank you so much !</p> <p>My website here : <a href="http://www.musixplore.ca/retour" rel="nofollow">http://www.musixplore.ca/retour</a></p> <p>I want the video player always at the same place in all of my post but I want to be able to change the video URL for each of my post.</p> <p>So I add theses lines in my single-video.php page into the editor.</p> <p><blockquote>&lt;?php</p> <p>if (function_exists('hana_flv_player_template_call')){<br /> $hana_arg="<br /> video='HERE I DONT WANT TO ADD ANY VIDEO URL !!!'<br /> splashimage='$splashimage'<br /> player='2'<br /> width='180'<br /> height='150'<br /> more_2=\"showStopButton: false, showScrubber: false, showVolumeSlider: false,showMuteVolumeButton: false,<br /> showFullScreenButton: false, showMenu: false, controlsOverVideo: 'locked',controlBarBackgroundColor: -1,<br /> controlBarGloss: 'none', usePlayOverlay:false \"<br /> ";<br /> echo hana_flv_player_template_call($hana_arg);</p> <p>}<br /> ?&gt;</blockquote></p> <p>I just dont know how to code this to make a custom field when I post a new article.</p> <p>Hope you understand what I want.</p> <p>PS: Ive tried the $videolink thing that I found on an other post and it's not working.</p> <p>Ill be really glad if you figure my problem and Ill donate money if you help me !</p> <p>Have a good day, </p> <p>Gravel22 from Quebec ! </p>