free hit counters
If you are using Internet Explorer as your browser please be running at least IE 7 or above. This site does not support IE 6 or below. Go here for the latest free version including easy download and installation instructions If you want to make it real easy on yourself, download Firefox , the most popular browser in the world. It's free and simple. You'll be so glad you did.
Apr
26
2009

Make your own multimedia box

The mm box is a great feature but did you know you can make your very own simple mm box and place it any where you want on your site? Basically you’re going to make a box in in html, place it with a function, and style it in your custom.css file. Once you create the box you can put any code you want in it…php, javascript, html, embed a video, your own custom code.

Check it out…

155

154

First you want to create the box with a simple function in your custom.functions.php file…

function mymmbox() { ?>
<div class="mymmbox"></div>
<?
}

I gave it a class name of “mymmbox” so that I can style it in my custom.css file. Name it whatever you want

Next I styled it in my custom.css file

.custom .mymmbox {
width: 91em;
height: 20em;
border: 1px solid
margin-left: 2em;
margin-bottom: 2em;
}

Then I decided I wanted to place it under my header so I added it with a hook

function mymmbox() { ?>
<div class="mymmbox"></div>
<?
}
add_action(’thesis_hook_after_header’ , ‘mymmbox’);

So there you have it. A real basic box that you can put anything into. Whatever you want to put in the new box, you place the code between the two <div> tags in the function.

You can now move it around anywhere you want with hooks in your custom.functions.php file, and you can change everything from the color, borders, size, etc, all in your custom.css

Leaving a comment with code in it...

If you would like to leave a comment and you have examples of code you want to show, you must "escape the code". This allows the entire code to show correctly by inserting certain variable around certain tags to make them show. If you don't "escape the code" your code will show up broken, mangled, and it won't be able to be seen correctly. "Escaping the code" is very simple...

  1. Copy your code you want to show
  2. Click here to go to the site to escape the code
  3. Follow the directions, it's so easy
  4. Once you have the escaped code copied, paste it in the comments area where you want
  5. Now you can enjoy life


Go ahead, leave a comment...

{ 1 trackback }

Really easy way to have random rotating images —customize Thesis with Thesis Hacker
April 27, 2009 at 8:20 am

{ 9 comments… read them below or add one }

Somone April 26, 2009 at 6:59 pm

I dabbled with having multiple MMBoxes in the header area – like DIYthemes – and got it going by adding the MMBox function 4 times in the feature box. If you have enough images and links to choose from you can get some decent variations without the same ones coming up repeatedly on each refresh. Did you want to share the code with how to do something like that? Also, how do you randomise what comes up each time e.g. different ebooks, ad blocks, feature articles?

Reply

Nasty April 27, 2009 at 8:23 am

Check out the the following tutorial…

http://www.thesishacker.com/really-easy-way-to-have-random-rotating-images

see if that helps….

Reply

Momisbuff April 29, 2009 at 5:33 pm

This is cool. Only thing is that I want to place this in my header, on the right. I already have logo and photo positioned to the left. I can’t quite figure out if I should be tinkering within the mymmbox code or using another wrapper, or some other way to position it? I’ve tried numerous ways, but it still shows up on the left, no matter what I do. Any thoughts?

I appreciate all your posts, BTW. This is a great resource for us noobs.

Cheers!

Reply

Nasty April 29, 2009 at 7:25 pm

Check this out and see if it helps…

http://www.thesishacker.com/add-images-within-your-header-image

Just act like your box is an image and place it like the tutorial shows…

Reply

Momisbuff April 30, 2009 at 4:37 pm

Hi, thanks. I’ve been tinkering and tinkering with it, but I cannot get positioning to the right of the header. I basically put an image there & played an played with everything I could think of to try to move it left. Nada. If I could get an image in the right spot, then I’d try to place the mmbox. I have wasted so much time on this. It can’t possibly be as hard as I’m making it. I’m not familiar enough with CSS styling elements.

Reply

Nasty April 30, 2009 at 5:24 pm

Give me a link to your site

Reply

Moylan Design May 13, 2009 at 10:58 am

For some reason I can’t seem to get this to work. Can you tell me what I’m doing wrong? Thanks so much.

Reply

Nasty May 13, 2009 at 10:26 pm

Yeah, but you need to tell me what’s going on. A link to your site too.

Reply

Estêvão Soares May 18, 2009 at 2:33 pm

Fantastic! Congrats on this one.

Reply

Leave a Comment

Previous post: Change the order of your nav links in your nav bar

Next post: Really easy way to have random rotating images