Theme The Morning After

The Morning After – Additional Asides, anyone?

This blog is based on Arun Kale’s theme „The Morning After“. Inspired by „The Morning After“ – discussion board, I decided that I am need for an additional asides section where I can post quotes that make a „free person“ think.

Getting started…

Create the category (Dashboard – Manage – Category – Add New) that should be displayed inside the new section. I called the category „Quotes“.


Open the home.php file with you theme editor and scroll to

< ?php $catid2 = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Featured'"); ?>

You insert the following line below to receive the catid of the category „Quotes“.

"SELECT term_ID FROM $wpdb->terms WHERE name='Quotes'"); ?>

Now, you have to exclude the „Quotes“ from Latest and Recent Posts. Therefore, you have to insert ‚ .$catid3. ‚ into the following line of the lastest_post section (code snippet after insertion):

< ?php $the_query = new WP_Query('cat=-' .$catid. ',-' .$catid2. '-' .$catid3. '&showposts=1&orderby=post_date&order=desc');

and into the recent post section (code snippet after insertion):

< ?php $the_query = new WP_Query('cat=-' .$catid. ',-' .$catid2. ',-' .$catid3. '&showposts=5&offset=1&orderby=post_date&order=desc');

Now, it is time to define the section where the quotes should appear. I have done that by inserting the following code below the asides:

<div class="home_asides"><!-- start Quotes -->
<h3 class="mast">Quotes</h3>
<ul class="arrow">&lt; ?php $the_query = new WP_Query('category_name=quotes&amp;showposts=1&amp;orderby=post_date&amp;order=desc'); while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?&gt;
<li>&lt; ?php echo strip_tags(get_the_content(), '<a><em>'); ?&gt; </em></a></li>
&lt; ?php endwhile; ?&gt;</ul>

This code shows the latest post of the „Quotes“ category and uses the „arrow“ design of the asides section.


The last (optional) step for adding a new asides section to „The Morning After“ is to exclude the category from the category navigation. Therefore, you have to open the sidebar.php in your theme editor and to substitute this:

< ?php $catid2 = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Featured'"); ?>

< ?php wp_list_categories('title_li=&sort_column=name&show_count=0&
show_last_updated=1&use_desc_for_title=1&exclude=' .$catid. ',' .$catid2. '') ?>

by this:

< ?php $catid2 = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Featured'"); ?>
< ?php $catid3 = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Quotes'"); ?>

< ?php wp_list_categories('title_li=&sort_column=name&show_count=0&
show_last_updated=1&use_desc_for_title=1&exclude=' .$catid. ',' .$catid2. ',' .$catid3. '') ?>


  1. I am your fan now;-)

  2. Great work!!!
    Could you write one post how to make Additional description box (like welcome to…)post, please? Create another page that I can post video or other thing on that box?

  3. No, I’m sorry.
    I’ve already deleted that description section from my home.php file.
    Just have a look at your home.php and and copy the the div class for the description. Then, you insert your video into the new div class.
    good luck.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.