My first wordpress theme

It’s done! There’s a demo with the unit test data at the Theme URI. Also, facebook & tweet buttons don’t validate. 🙁 Here’s the notes for it:

This file last modified: 3/27/11.

Theme Name: darkbasic
Theme URI:
Description: Simple blue, dark gray and black theme with 1 sidebar and no artsy stuff. This theme supports widgets and custom menus.
Author: luna
Author URI:
Version: 1.0

License: GNU General Public License v2.0
License URI:


-This is my first theme and I’m late to the CMS party. 🙂 Please bring issues to my attention as I’m still learning.
-Print styles included in style.css.
-editor-style.css copied from the 2010 theme.
-I’m not exactly sure what the point of post_thumbnails is, but it’s supported.
-This theme supports menus natively.
-There’s room for facebook & tweet buttons in footer.php using id: div#likeme.
-Tried to validate as much as possible for XHTML 1.0 Strict.


-Comment_form() does not validate because of attribute ‘aria-required’. Hope it becomes standard…
-Large images that use the max-width & height rules look cruddy in IE.
-Links that are in .post p a will not have the gray hover background most other links have. Unaligned uncaptioned linked images in the same class will have a gray background on hover. Getting rid of margins/padding/borders will still leave a ~3px gray hover. The only other solution I got working was to set display: block;, which isn’t what I wanted. This is commented in the style.css.
-No translations done, I don’t understand enough of the documentation to do it, and know no other languages. Text domain issues in single.php, page.php, index.php.

13 thoughts on “My first wordpress theme

  1. I like your design, I am currently using it. I do have two questions for you. When using a gallery it works fine on the first post but every post after that no longer uses it. It goes in vertical. How can I fix this? is there a way to add a picture to the header?

    Thank you

    1. Hi, thanks for giving it a shot! 🙂
      Do you have a link to the gallery in question? It should work like this one:
      Did you make any modifications to the code?

      As for adding an image to the header, you can put it in style.css, in the rule starting on line 264:
      #lunazheader {

      Then remove the rule starting on line 282:

      #lunazheader a:hover {
      background-color: #000;

      1. Yes the first post looks like that, but once I add a new post that gallery is now straight up and down. I have not made any changes, don’t know how. lol. I can send you the link but it is adult, NC17.

        I will try to change the header.

        1. Are all your posts galleries or is there a mix of regular posts too?

          When you say vertical, it just does one image per DIV right, like:


          instead of:

          = = =
          = = =

          edit: yep thats what it does… just tested it on my test install. I’ll see what I can figure out… 🙂

        1. Ok I rule at copy pasting stuff from the 2010 theme! This should fix it:

          Delete everything starting line 224 where it says /*gallery shortcode styles*/ to line 255, the end of .gallery-caption {}

          Replace that with this:

          /*gallery shortcode*/
          .format-gallery .size-thumbnail img,
          .category-gallery .size-thumbnail img {
          border: 10px solid #666;
          margin-bottom: 0;
          .format-gallery .gallery-thumb,
          .category-gallery .gallery-thumb {
          float: left;
          margin-right: 20px;
          margin-top: -4px;
          .home #content .format-gallery .entry-utility,
          .home #content .category-gallery .entry-utility {
          padding-top: 4px;

          .attachment-thumbnail {
          display: block;
          margin-left: auto;
          margin-right: auto;
          border: 5px solid #666 !important;

          .gallery-caption {
          font-size: 85%;

          .gallery {
          margin: 0 auto 18px;
          .gallery .gallery-item {
          float: left;
          margin-top: 0;
          text-align: center;
          width: 33%;
          .gallery-columns-2 .gallery-item {
          width: 50%;
          .gallery-columns-4 .gallery-item {
          width: 25%;
          .gallery img {
          border: 2px solid #c0c0c0;
          .gallery-columns-2 .attachment-medium {
          max-width: 92%;
          height: auto;
          .gallery-columns-4 .attachment-thumbnail {
          max-width: 84%;
          height: auto;
          .gallery .gallery-caption {
          color: #c0c0c0;
          margin: 0 0 12px;
          .gallery dl {
          margin: 0;
          .gallery img {
          border: 10px solid #c0c0c0;
          .gallery br+br {
          display: none;
          #content .attachment img {/* single attachment images should be centered */
          display: block;
          margin: 0 auto;
          /*end gallery*/

          Or if it’s easier the whole file is at

          I’ll make sure this works for you before I submit the fix to the official repo.
          What happened with the header?

  2. I will give it a try, tonight. Thank you so much.

    As far as the header. I wasn’t able to change it to the picture I wanted. I am not good at that stuff or need more help. lol
    If the picture is on my hard drive where should I upload it to and then I guess I have to point that line to it?

    1. I would upload it to the darkbasic folder, usually under wp_content/themes/darkbasic

      Then in the css all you have to do is change the filename & not have to worry about paths. Those confuse me… 🙂

    2. Hey, did you get it working yet? Just checking. I moved my site to a linux host over the last couple weeks & hoping stuff isn’t b0rked. 🙂

Leave a Reply

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