Thesis Tutorial Feature Box

October 29, 2010
By

The­sis Tuto­r­ial Rotat­ing Con­tex­tual Ban­ner in Fea­ture Box

This The­sis Tuto­r­ial shows step by step how to add rotat­ing ban­ners to the Fea­ture Box. The Fea­ture Box has a drop down menu from where you can choose the posi­tion of the ban­ner. In func­tion of that choice you will then edit the images (size).

The The­sis Fea­ture Box in Action

The below image illus­trates the result you will achieve by fol­low­ing this tutorial:

Yorgo Nestoridis Screenshot

As you see my choice was to add the  rotat­ing ban­ners in full width under­neath the menu. The Header Ban­ner is above the menu. Using a large size ban­ner, I decreased the size of the header ban­ner. On the right side you see the Mul­ti­me­dia Box under­neath the rotat­ing banners.

My Ban­ner size is 960 pix­els x 278 pixels.

Semo­man­tics The­sis Author Blog

Semi­oman­tics Author Blogs have all scripts built in and you can skip the fol­low­ing steps which are mar­ket with a *.

Get the Dynamic Con­tent Gallery Plugin *

From your dash­board under Plu­g­ins, select Add Plu­gin. Type into the search box “Dynamic Con­tent Gallery” and install and acti­vate the pugin.

Add the Func­tion to Thesis *

Edit custom-functions.php from your Cus­tom File Edi­tor and add the fol­low­ing code:

//-------------------featured content--------------
function featcc() {
if (is_home()){
global $post;
if( function_exists( 'dynamic_content_gallery' ) ) :
dynamic_content_gallery();
endif;
}
}
add_action('thesis_hook_feature_box', 'featcc');

With this code we hook the Dynamic Con­tent Gallery to the The­sis fea­ture box for dis­play. Also, the fea­ture box dis­plays on the home page only, as on the other pages we use the Top Carousel.

Con­fig­ure the Dynamic Con­tent Gallery Plugin

You may choose another con­fig­u­ra­tion. As an exam­ple I just copy here what my set-up looks like. Edit the Dynamic Con­tent Gallery from your Dash­board under “Settings”:

1. Image Management

image management configuration

I select Full URL to keep absolute flex­i­bil­ity about the image source; this could be an exter­nal link to an image server. In fact I just load my images to the main image folder in the domain root.

2. Gallery Method

Gallery Method Configuration

To keep the image and gallery man­age­ment sim­ple, I cre­ated a new cat­e­gory called Fea­tured Main. All posts which will have a fea­tured ban­ner, will also be added to that cat­e­gory. There­fore I select here “One Category”.

Scroll fur­ther down and you will find more options:

Thesis Tutorial Gallery Method 2

As you see, I selected the Fea­tured Main Cat­e­gory and I choose to dis­play 4 posts.

3. Descrip­tions

For rea­sons of lazi­ness I keep the set­ting on Auto and dis­play 100 signs. In fact, my posts are usu­ally struc­tured in a way that the auto­matic excerpt has some meaning…:-).

4. Gallery CSS

Just a copy of my settings:

Thesis Tutorial Galley Style

5. Javascript Options

I select jQuery and I show the carousel with the ban­ner (it’s the drop-down over­lay on top right of the ban­ner which dis­plays thumb­nails of the ban­ners). You may give that tab a more inter­est­ing name than Fea­tured Arti­cles, for exam­ple: Must Read. Note that I des­e­lect the left and right arrows which serve to scroll the ban­ners; I just think they are not nec­es­sary and ugly.

Thesis Tutorial JavaScript Options

6. Load Scripts

As we dis­play the ban­ners on the home page only, I select Home Page to load the script only where needed.

7. Tools

I don’t dis­play Error Mes­sages and enable the edit­ing box in the page and post edi­tor as follows:

Thesis Tutorial Tools

You will now be able to add ban­ners from your Word­Press edi­tor to your post or to over­write some of the con­fig­u­ra­tion settings.

8. Load some Banners

I just headed over to Pho­to­shop and made a few ban­ners which I uploaded to my main image folder:

Ycademy Banner Thesis Tutorial

Thesis Tutorial Semiomantics Banner

Thesis Tutorial CSS Banner

Thesis Tutorial Thesis Banner

As I have con­fig­ured to dis­play 4 ban­ners, the above four will do the trick.

9. Attach the ban­ners to some key posts

Now  I select 4 key posts from my blog and edit them:

I add the Fea­tured Main cat­e­gory to all of them and then I add the cor­re­spond­ing ban­ner image link to each post and update the post:

Thesis Tutorial Add Featured Banner to Post

10. Time to enable the Fea­ture Box

In your Design Options tog­gle Fea­ture Box and select the position:

Thesis Tutorial Feature Box

I select Full width above con­tent and side­bars. The home page selec­tor is not active as we have over­writ­ten the func­tion in custom-functions.php.Also the Dis­play Options are not built into The­sis yet, how­ever if you wish to style the box, do the last step below:

11. Style your Fea­ture Box

If you would like to get rid of the light gray back­ground and the bor­ders or style the box dif­fer­ently all together, just add the fol­low­ing few lines to your custom.css from the Cus­tom File Editor:

/*----------------Feature Box-------------- */
.custom #feature_box { background: #ffffff; border-style: solid; border-color: #fff; }

I have set it all to white here, but you may mod­ify and adapt to taste and amend this CSS code as needed.

Incom­ing search terms:

Related posts:

  1. The­sis Tuto­r­ial Header Ban­ner Rotator
  2. The­sis Tuto­r­ial Author Box
  3. Cre­ate a Header Wid­get in Thesis
  4. Semi­oman­tics The­sis Interpretation
  5. Cre­ate a Wid­get below the Mul­ti­me­dia Box in Thesis

Tags: , , ,

6 Responses to Thesis Tutorial Feature Box

  1. rohan @techlunatic.com on January 28, 2011 at 12:57 pm

    nice post, cov­ers all aspects from select­ing a proper plu­gin to cus­tomiz­ing it!! any side effects like slow load time or over con­sump­tion of server resources?

    • Yorgo Nestoridis on January 28, 2011 at 1:19 pm

      Hi,
      there was no sig­nif­i­cant slow­down notice­able; test­ing with YSlow the site was always run­ning in the high 80s or low 90s. In as much as server resources are con­cerned, the prob­lem is Mem­ory and depend­ing on the var­i­ous plug-ins you use you may need to increase allo­cated mem­ory for php exe­cu­tion. While 32 MB may be too lit­tle, namely if you run plug-ins such as NextGen Gallery, with 64 MB you are on the save side. We pushed things and man­aged even to exceed 128 MB but this is then rather an edit­ing problem.

  2. octavian on November 6, 2010 at 11:10 pm

    Incred­i­bly help­ful and patient in your expla­na­tions, thank you so much for help­ing me out. I was try­ing with my novice’s knowl­edge of CSS, JS and WP to get through, but it didn’t get me any­where near until I read your tuto­r­ial. Thank you!

    • Yorgo Nestoridis on November 7, 2010 at 12:35 am

      Thank you. If you need other tuto­ri­als, just let me know and I will try to set them up for you.

  3. Bianca Gubalke on October 29, 2010 at 8:29 pm

    I like “some mean­ing” under 3 !!!

    This is just another fan­tas­tic tuto­r­ial — Ycad­emy Sem­i­nar par­tic­i­pants are so lucky… — THANK YOU!

    • Yorgo Nestoridis on October 29, 2010 at 10:28 pm

      True, with­out com­ment as this applies to all users of Semi­oman­tics tuned scripts :-).

Leave a Reply

Your email address will not be published. Required fields are marked *

*