Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Embed video?


  #1  
Old Feb 18, 2012, 08:06 AM
NCSUresdev
 
7 posts · Apr 2011
I want to embed videos in posts. I like the way "Simple Video Embedder 2.2 (James Lao) works straight from the post page, but I have to edit your code to make it work (directions below). I'm not understanding which file the code goes in, nor do I relish altering your code. Please advise -- or can you suggest a video embedder that works well with Atahualpa?

Simple Video Embedder directions:

In order to show the videos, the p75GetVideo() function needs to be inserted somewhere in the loop of your theme. The function has the following prototype:
string p75GetVideo(int $post_id)

This function returns the embed code of the video for the post with ID $post_id. Note that it does not print out the embed code but returns it as a string that you must echo. There is also a function that checks whether there is a video for some post.
bool p75HasVideo(int $post_id)

This function returns true if the post with ID $post_id has a video and false otherwise. I suggest you use p75HasVideo() to check for a video, and only get the video with p75GetVideo() if it returns true.

Something similar to this should go in the main loop of your theme:
if ( p75HasVideo($post->ID) ) {
echo p75GetVideo($post->ID);
}
  #2  
Old Feb 18, 2012, 09:14 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
There are many video embed plugins that don't require messing with the theme code. Even JetPack has that functionality. I like the vid plugins from iThemes. These are premium plugins but I like how they work.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Tags
video display, youtube embed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
recommended youtube / video embed plugin? singldedudetravel Plugins & Atahualpa 0 Jan 12, 2011 09:25 AM
Atahualpa 3.5.3 — Can't embed video lehenryjr Center area post/pages 2 Dec 10, 2010 03:26 PM
[SOLVED] Embed Video in 3.53 wppg Center area post/pages 4 Oct 26, 2010 12:46 PM
Embed PHP LostBrooklynGuy Plugins & Atahualpa 4 Mar 30, 2010 05:24 PM
How to embed video in a post? Jody Post-Kicker, -Byline & -Footer 2 Mar 22, 2009 02:16 PM


All times are GMT -6. The time now is 11:14 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.