[wp-hackers] Adding video to theme widget/hack/??

Otto otto at ottodestruct.com
Mon Jun 28 05:20:56 UTC 2010


If it's a more recent widget using the widget class, then you can use
the_widget function in the theme to display it as a template tag.

Example:

class Test_Widget extends WP_Widget {
... bunch of widget code ...
}

the_widget('Test_Widget'); will display the widget anywhere you like.
You can add an array of instance parameters as the second argument if
necessary.

-Otto



On Mon, Jun 28, 2010 at 12:12 AM, MarvinC <marvinc at gmail.com> wrote:
> I'm setting up a video project using a three column theme called
> videographEx which comes with two sidebars set at 170 each. Atop of the two
> sidebars site an ad_sidebar.php file which allows you to add a 300x300 ad or
> banner. What I'd like to do is at a 300x300 video. I've managed to locate a
> slew of decent YouTube widget plugins but none seem to instruct on adding
> the widget to the theme using the php code. In other words I can drag and
> drop within WordPress but this looks like one instance where I'd like to
> hard code the code for this particular template.
> I'm mainly using YouTube plugins so if anyone knows of any way for me to
> make this happen I'd greatly appreciate it!
>
> Any responses applied.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list