How to style the Motion Theme for WordPress

- by

I had a closer look at this theme the other day when I made some upgrades on Nadia’s website.

I really like the look and feel of Motion but I felt certain things were missing from this wonderful theme, such as drop down submenus.

Let’s take a look at some tweaks and how you can make Motion your own.

This article was written for Version 1.1.6 – these tweaks may not work in later revisions of the theme.

Removing default Navigation

This version of Motion includes two areas for navigation menus: one called “Top” is at the very top of the screen, and another is called “Primary” just below the header.

Even without a custom menu active these two menus show some default values: the Top Nav shows pages whereas the Primary Nav shows categories. This can be annoying when you only want one of these navigations to be visible.

To remedy this, head over to Appearance – Menus. Create a new menu here (let’s call it Empty) then place nothing inside. Now select the Empty menu as your Primary Menu and your “no categories problem” is gone.

Primary Navigation and Drop Down Menus

One of the surprising things is that subpages and sub categories do not appear as drop down menus as you’d expect. Let’s make it happen!

The good news is that the CSS has built in support for drop downs on the Primary Menu – all we have to do is make the sub pages show up. Have a look at your header.php file and find this piece of code:

if (has_nav_menu('primary')) {
 wp_nav_menu( array(
 'theme_location' => 'primary',
 'depth' => '1',
 'menu_class' => 'primary_menu') );
 }

The depth parameter (1) tells WordPress not to display sub items in the menu. Let’s change that to 2 and drop down menus now work like a charm below the header!

Please note that this does not work for the Top Navigation menu (where it would be annoying – so let’s not go there).

Bigger Nav Menus

To increase the size of the top navigation, hunt around for this code block in style.css:

#top .top_menu li a {
	color: #fff;
	font-size: .75em;
}

Change the font-size element to 1.5em or similar. You can even add a line like font-weight: bold; to make the menu stand out.

To increase the size or the Primary Navigation (below the header) hunt around for this piece of code – same thing here, change the font-size value:

.primary_menu li a {
 display: block;
 margin: 0;
 font-size: 0.8em;
 color: #fff;
 padding: 0 13px;
}

Removing default Footer Widgets

The footer shows “default widgets” which are often designed to show how a theme would display widgets. They show up when you don’t use widgets – which can be annoying.

To get rid of those just add an empty Text Widget into each widgetised area at the bottom you’d like to leave empty.

Bigger Site Title

In style.css have a look for this block of code:

#header #logo h1 a {
	color: #fff;
	font-size: 2em;
	font-weight: normal;
	text-shadow: 0 0 6px #555;
}

Here you can change the font-size element to say 3em, that’ll be big – play around with it and see what suits you. The colour of the site title is changed by replacing the #fff with your preferred value. If you’d also like to change the hover colour look to this piece of code:

#header #logo h1 a:hover {
 color: #a8ef9d;
}

Amending the Welcome Box

The Welcome Box is the piece of text next to the Site Title, the one that reads “Hey there, thanks for dropping by…”. You may want to provide your own text here, perhaps an author picture even, or you just want to get rid of it.

The code for this is in header.php and looks like this:

<div id="headerbanner">
 <p>Hey there! Thanks for dropping by <?php bloginfo( 'name' ); ?>! Take a look around and grab the <a href="<?php bloginfo( 'rss2_url' ); ?>">RSS feed</a> to stay updated. See you around!</p>
 </div>

Amend as you like, comment out or delete from opening to closing div tag. Alternatively, if you’re building a Child Theme and you don’t want to redefine the entire header file, you can add this piece of CSS to your style sheet to suppress the message:

#headerbanner {
display: none;
}

Removing the Search Box

Even though the Search Box at the top of the screen is a nice touch, it can get in the way if you’re going for a much simpler look. We decided it would be better off in the sidebar as a standard widget.

In header.php you’ll find this call to to PHP script – simply delete or comment it out:

<?php get_search_form(); ?>

Footer Copyright

If you’d like to change the copyright message at the bottom of the page, take a look at the footer.php file and find this piece of code:

<div id="credits">
 <div id="creditsleft">Powered by <a href="http://wordpress.org/extend/themes/" rel="generator">WordPress</a> &amp; <a href="http://www.webdesigncompany.net">Web Design Company</a></div>
 <div id="creditsright"><a href="#top">&#91; Back to top &#93;</a></div>
</div>

Amend this as you like – but please keep in mind that credits should be where credit is due. You’re already getting a free theme, why not link to the people who’ve given it to you.

How to remove Page Titles on full screen pages

Sadly Motion does not target the page titles via CSS so we can’t easily suppress them them. When you display a page without a sidebar you’ll still be left with a smallish page title as opposed to one that has the translucent border. If you want to get rid of this take a look at your page.php file and find the following block of code:

<?php if (!(the_title() == "")){ ?>
<divclass="posttop">
<h2><?php the_title(); ?></h2>
</div>
<?php } ?>

Delete the entire thing and your page titles will be gone. This will not affect pages with the sidebar, as these are targeted by a different fie.

That’s all folks – best of luck and Happy Hacking 😉

Further Reading



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

67 thoughts on “How to style the Motion Theme for WordPress”

  1. Hi Guy,

    the background image is set in style.css on line 45 in the body element, just underneath General Elements:

    /************************************************
    * General elements *
    ************************************************/
    body {
    background: #000 url(images/bodybg.jpg) top center no-repeat fixed;
    padding-bottom: 20px;
    font-family: "Lucida Grande","Lucida Sans Unicode",Verdana,Arial,Helvetica,sans-serif;
    text-align: center;
    }

    Replace the url (images/bodybg.jpg) with your own image URL (like http://yourwebsite.com/yourimage.jpg) and you’re ready to rock. Please note that the Appearance – Background dialogue does not work for this theme.

    Making this conditional is another story – you’d have to do the page check in PHP and then load the re-define the CSS. It means a lot of code rewriting and it’s beyond the scope of this article.

    Hope this helps 😉

  2. Hi Tim,

    I’m not entirely sure what you mean by the Home Template. If you mean the tab that says “home” above (and below) your page title then that’s done via Custom Menus. By default, Motion has both menus activated and fills it with categories (at the top) and pages (at the bottom).

    To override this, head to Appearance – Menus and define two custom menus there. Select and activate them both, then populate them with elements you’d like to appear there.

    I’m explaining more about Custom Menus in this screencast.

    Hope this helps 😉

  3. Hi Jay
    Thanks a lot for your reply and please forgive my bad English… I’m French.
    Here’s the sit I’m making for an artist (tempo.)
    http://www.info-france.fr/christakiger-art
    As you can see there’s a pic on frront page with an armchair. This is a problem to read further post or shop post.
    That’s why I would like to keep the home page with this pic and get another one for the rest of site.
    I used the background theme function to upload the pic. I guess there’s a way to set a conditionnal to force this pic only on front-page but I’m very poor in css so I have to learn or to get a similary needs already solved! 🙂 (No I’m not lazy!)
    Thanks again for your help… I go on searching.
    Regards from Cannes!!! Where it’s really hard to drive today!

  4. Hi Jay,

    Thanks for your quick response. It wasn’t the menu’s that I was asking assistance with (although I will probably edit those at some point using your notes above.

    On my site timclare.com there is the page title text “Home” that appears on the line just before “welcome to my homepage”. This is the text I would like to hide. And if this is easy enough to do I assume I would be able to change some other pages to hide the title (i.e. not in the menu but on the page itself) too?

    I assume I will need to change some of the motion themes code in he editor but can’t figure our which bit!

    Many thanks for your help,
    Tim

  5. The only way to do it would be to have two identical stylesheets, one for the front page, and one for the rest of the site. The only difference is the background image. The stylesheet loads in the WordPress header.php file – see where that happens and add a PHP query to see which page this is (use the is_home() function for this). Then load the appropriate stylesheet.

    I’ve never done this myself, so that’s just the way I would do it. Hope it gets you on the right track (and I hope the Cannes traffic is going to calm down soon ;-))

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.