Modularity Lite returns with version 1.3, this time boasting WordPress Menus and a dynamic slideshow option to keep us excited. You can even change colours and your background image. Making it your own was never easier. Here are my notes from when I created minor amendmends for Simon’s website SoundCredit.tv.
My original article on how to style this puppy goes back to version 1.1. With each update, the code has dramatically changed and therefore needs different tweaks. If you’re running an older version of Modularity Lite, check out my instructions for Version 1.2.
Instructions Included
Your first port of call when tweaking this theme is to check out the included instructions. They can be found as handy HTML file in /wp-content/themes/modularity-lite/instructions.html. So if your website is www.yoursite.com, and WordPress is installed in your root directory, you can read them browsing http://www.yoursite.com/wp-content/themes/modularity-lite/instructions.html
It’s essential reading. Tells you a lot – but not everything
Dynamic Slideshow
The new dynamic slideshow pulls in images from your last 5 posts and displayes them. For this to work, you’ll first have to enable the slideshow by ticking the box in Appearance – Theme Options.
I had some trouble getting images to show up, so here’s what I’ve learnt:
- Images need to be associated with posts. If you add them to a page, or if you upload them via the media uploader without associating them to a post, those images will not show up in the slideshow.
- Your slideshow is 950×425 pixels by default. If you upload images that are smaller than this, they will not show up.
To reiterate: Slideshow images MUST BE exactly 950×425 pixels or larger. Smaller images WILL NOT show up. Don’t ask me why – I’m just the messenger
Slowing Down the Slideshow
Again this has slightly changed from previous versions. Those transition effects are done with something called Jquery Cycle Plugin. For our purposes, we need to have a look at the functions.php file and find this bit of code at the bottom of the file:
jQuery("#slideshow").cycle({
speed: '2500',
timeout: '500',
pause: 1
The “timeout” value is the one we want to change. Change it to 5000 and your slides will show for 5 seconds, 10000 will show them for 10 seconds, etc.
The “speed” value is responsible for the transition duration. The default looks good to me, but try 5000 for sloooower transitions, or even 1 for cuts between pictures.
Static Slideshow
I wanted to build a brochure site with static pages and didn’t need the CMS or “posts” part of the website. By default however, the slideshow only displays when you show “your latest posts” on your homepage. It disappears when you show “a static page” (you can select this under Settings – Reading).
My first idea was to only show one post on the front page and be done with it – however this will only display the image from the post shown. Images from Posts that are not shown are not incorporated into the dynamic slideshow. Bugger!
This leaves us no option but to re-write the code that used to work so well in Version 1.2. Let’s do that. First, let’s create a folder for our images:
- in the theme folder (/modularity-lite/) find the /images/ folder and create a new one called /slideshow/ – just like in the old version you’ll end up with /modularity-lite/images/slideshow
- find 5 suitable images you’d like to use for the slideshow (950 x 425px or larger)
- name them “image1.jpg”, “image2.jpg” and so forth amd upload them into the slideshow folder
Next, edit the page.php file and find where the get_header() statement is executed. Right underneath it we’ll call the slideshow images by adding this bit of code:
<!-- Begin slideshow -->
<div id="slideshow">
<div><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slideshow/image1.jpg" alt="<?php bloginfo('name'); ?>" /></div>
<div><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slideshow/image2.jpg" alt="<?php bloginfo('name'); ?>" /></div>
<div><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slideshow/image3.jpg" alt="<?php bloginfo('name'); ?>" /></div>
<div><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slideshow/image4.jpg" alt="<?php bloginfo('name'); ?>" /></div>
<div><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slideshow/image5.jpg" alt="<?php bloginfo('name'); ?>" /></div>
</div>
This will rotate our new images on each and every page – no questions asked.
If you would like to use the static slideshow on your “blog” page instead, then insert the above code in the index.php file (again underneath the get_header() statement).
Conditional Slideshow – only show it on certain Pages
Making the above principle of the Static Slideshow conditional is a tad more tricky because it requires more coding; say you have 5 static pages and you only want the slideshow to show up on one of them, that sort of thing. Here’s what you need to do:
- take the above slideshow code and put it in an empty text file
- call it “slideshow.php”
- upload it into the theme’s directory (in our case the full path is wp-content/themes/modularity-lite)
- find out which page ID you’d like the slideshow to appear on – I’ll explain how this works in a minute
Next, open your page.php file and add the following conditional statement underneath the get_header() statement. For this example, we’ll assume your page ID is 11:
<?php
if ($page_id == 11)
include ('slideshow.php')
?>
This snippet will check if we’re on the right page, and if that is the case it loads the code from above via the file you’ve uploaded. If we’re on any other page it simply ignores the file and no slideshow is displayed.
To find out your page ID, go to Pages and hover your mouse over the page titles. Keep an eye on your browser status bar at the bottom – you’ll see the value change where it says “…?post=11″ – that number is your page ID.
Changing the Slideshow Height
Would you like to adjust the height of the slideshow? That’ll turn it into animated headers – very swish indeed! All you need to do is take a look at the style.css file and find the following snippet (it’s towards the end):
/* Slideshow */
#slideshow {
padding: 0;
list-style: none;
margin: 0 0 3em 0;
overflow: hidden;
min-height: 425px
}
Adjust the min-hight parameter to something like 200px and your slideshow loses some height. Regardless of how tall your pictures are they will be cropped automatically (and free of charge… nice!)
Pages: 1 2





{ 219 comments… read them below or add one }
← Previous Comments
Next Comments →
Hi Jay
A long time ago you kindly advised me of a way using Googles Feedsmith to add an e-mail subscription option to my blog. Despite trying very hard to make it work I just could not sort it out and then ended up giving in and surviving without it. I have recently been trying to make it work again as I would really like to have this functionality on my travel photography blog. Please can you help me again and start from scratch. I would really appreciate it. Many thanks. Yann.
Hi Yann,
that’s a little bit off topic – but in essence the steps involved are:
1.) get a Feedburner Account at http://www.feedburner.com
2.) find your feed and add it (say yourdomain.com/feed)
3.) grab the Feedburner Feedsmith plugin they give you
4.) pop in the new feed they give you into the plugin (say feeds.feedburner.com/yourfeed)
All functionality can then be set in the Feedburner backend, including free email subscriptions and tweeting.
I can set this up for you if you like – please purchase two of these and It’ll be up and running by tomorrow: http://wpguru.co.uk/support/plugin-installation/
Jay
Thank you so much, I finally managed to get it working. I’m still not exactly sure how It worked as I still got quite lost using your detailed instructions.
Thanks a million.
Yann
Glad to hear it
Hello again,
I am having problems to hide my front page title (Accueil) without affecting the other pages’ titles. I’ve tried to edit my page.php but my Featured Articles Slider’s title gets also deleted.
Any thoughts about this ?
Thanks a lot !
Hi Jay,
Your instructions on putting the slideshow back to how it worked on 1.2 has absolutely saved my life! Thanks so much for such a useful post.
Do you know how I can change what links appear in the main-nav list in the header as well? Is there some way I can just specify which pages and sites I want to have links to?
Thanks again!
Ooop, never mind, I just worked it out!
Excellent – glad it all worked out for you
Hi there,
Great post overall. I am trying out your solution to having both a static page on the front instead of recent posts AND having the slideshow, but I am a little confused – where can I create an images folder and edit the PHP file? I can’t find anywhere to do that on the site.
Please help – it would be the perfect solution!
Thank you!
Joanna
No problem Joanna: all your files live on your web server, which is provided to you by the hosting company you’re with (unless of course you’re with WordPress.com – in which case I’m afraid none of these mods will work for you). WordPress.com is a closed system and as such you’re not allowed to modify the PHP files.
If you’d be self-hosted, then you can access those files either from within WordPress (under Plugins – Editor), or you can access them via FTP (which is like Windows Explorer or Finder). Make the adjustments in a text editor – or if you have access to something like Dreamweaver you can use that, then copy the files back and the modifications are in place.
Hosting is relatively cheap to come by, good hosting is a tad more expensive but well worth it depending on where you want to go with your site. Let me know if you’re interested in really good WordPress hosting, my company provides this at WP Hosting.
“pause : 1″ in slideshow jQuery-script (functions.php) stops the slideshow on mouseover.
“pause: 0″ keeps slideshow running, no matter, where the mouse is.
thanks for all the help on modularity
B.
Superb input, B! Much appreciated
hi,
i want to make a website which will display the to[p ten websites in different categories( on the main page categories with pictures will be shown and when the user clicks on any category he will be taken to the page showing top ten websites under that category)
please suggest any wordpress theme and plugin(s) for this purpose
thank you
Hi, nice blog, you have amazing info here and hopefully you can help me with this. I have modularity theme. In the home page I put the Post Slider, which works better for me than the slide show, But it seems the posts slider does not automatically change from one post to another, I have to click on the numbers I have on the top for it to move from one to the other. I which to know if there is a way to get this done in wordpress.
thanks =)
Hi Manuel,
what’s the Post Slider? It’s not part of the theme as far as I know – is it a plugin? Could you provide a link to it?
Hi Jay
I’m so excited that you are supporting people on this theme! I need your help as well. I’ve revised this theme as much as I can but just can’t seem to get the GPP category slider to work on the homepage, get the posts off the homepage and make it look like http://www.hunterphotographic.com/.
The support from GPP said this “The Base Hook Widget only works with our Base themes, so you won’t be able to use it with Modularity Lite. To get this to work, you’ll need to either create a new widget area where you want it and insert it into that new area, or manually add the slider into the theme.”
They have changed things around with this latest version so all the forums aren’t helping. I’m also trying to get the blog off the front & re-size the slideshow – CSS changes aren’t working- any suggestions?
I REALLY appreciate your time – thanks so much!
Nicole
Hi Nicole,
I hope I understand you correctly – you can’t get the slideshow to work, correct? I’ve not heard about the Base Hook Widget, so if it’s the slideshow you’d like to use then it’s a bit misleading what they’ve told you.
It works out of the box with all new posts (the latest 5 in fact), provided they have a featured image set. What the documentation is not telling you is that the images must be exactly or larger than 950×425 pixels – images smaller than that won’t show up. I keep forgetting this though and it catches me out every time
Try this first before you do any other step and see if this helps.
To get the blog off the front page and to another page head over to Settings – Reading and specify a page where you’d like it to show up (this can be a blank page). You also need to specify a static page for the front page here. Beware though that doing so will also remove the slideshow to where ever your blog is moving to – which is possibly not what you want.
Hi Jay – thanks for the quick reply!
Well it looks like I’m going to scrap this theme – just not worth all this work. I think I’ll go with GPP’s base theme – install the Base Hook Widget – add Nivo slider & get this poor client up & running. This is what I get for not purchasing the full themes – I end up customizing them anyhow & wasting so much time.
That’s the price of free I guess
I think you’ve made the right decision to purchase the premium version, I’ve never regretted investing in premium themes – they usually come with great support, tons of options and they just get the job done quick. That’s true for GPP, Woo, Thesis and many of the others.
Hi Jay,
Perhaps you’ve already answered this question, but how do I make the Top Navigation Menu perform a drop down function when the mouse is over the page?
I’m definitely a newb when it comes to using Modularity Lite. Twenty Ten seemed to do this automatically after selecting a Parent Page/Child Page, but I guess I’m not understanding the process.
Thanks in advance,
Jim
Hey Jim,
Yes that’s an easy fix: define a custom menu and activate it, that’ll bring your drop downs back to life. The old (default) hierarchy isn’t so useful anymore.
In a nutshell, head over to Appearance – Menus and create a new menu. Call it anything you like. Next, activate it (top left). Now add pages, categories and custom link to the menu. Drag and drop them anywhere you like – move items slightly over to the right underneath another item to create “child” items. These will drop down.
Save and refresh your front page to see the result. It’s magic
← Previous Comments
Next Comments →
{ 1 trackback }