Support » Themes and Templates » I have created a custom layout now to turn it to a theme

  • Resolved xtra


    I have created my design, a simple layout with a content, navigation and footer section. I am looking at just creating a static page for the index but having a news section for another page (use the blog tool)

    I wanted too ask if anyone can point me to a direct tutorial of integrating my design into a theme, I have found the wordpress lessons but wondered if there was an easy tut that showed you a basic set up otherwise is it a case of reading through each of the pages in wordpress lessons?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Cheers, thanks for the link, will I need much luck? I have good understanding of html/css but only understand the concept of php

    Unless you are doing some custom work with the WP loop, you don’t really need to know much PHP. I think if you want to develop a theme, it’s more important that the theme itself is tight, that its HTML and CSS validate. (Later on, people will download it and add sloppily constructed plugins that will cause the HTML to not validate, but as long as it does so when you release it to the public, you are fine.)

    Here’s one other tip for you, worth exactly what you paid for it. 🙂

    If you decide to include in your sidebar the code for some of the more popular plugins (such as Alex King’s share this, recent comments, etc.), it’s always best to leave a “plugin parachute” as I call it. The code below tells WP to ignore that code IF the plugin is not installed or activated. This keeps the sidebar from throwing up on itself if the person using your theme hasn’t downloaded or activated that particular plugin. Just another way to tidy up after yourself. The example below is for MTDewVirus’s Recent Comments plugin:

    Normally, the plugin code looks like this:

    	<?php mdv_recent_comments() ?>

    You want to add some code like I mentioned above to tell WP to ignore the plugin call if it’s not installed:

    <?php if (function_exists('mdv_recent_comments')) { ?>
    	<?php mdv_recent_comments() ?>
    <?php } ?>

    Notice this code before the actual plugin code:
    <?php if (function_exists('mdv_recent_comments')) { ?>

    And this code afterward:
    <?php } ?>

    Hey thanks for that info.

    My code xhtml/css is validating and is clean.

    It is very simple, content (news box which sits inside content), sidebar and footer

    I will try and have on the front page a little news box highlighting the latest three news-blog entries, so what you have mentioned here is something I will need to learn about.

    When I look in the default theme folder there is a lot of files? do I need them all, as the site I will make want allow for comments, its just going to be for a basic 5-8page website that can use the CMS feature of WP, I thought for learning WP it is best to start out small

    Just found a basic tutorial which looks like a simple starting point.

    My code xhtml/css is validating and is clean.

    This is excellent. And yep, that’s a great tutorial! Now go forth and create!

    Now, about the templates. These are the default templates:


    I generally also include:
    page.php (I strip the comments template out because I don’t believe you should invite comments on static pages, but that’s just a personal preference)

    single.php (you can add extra post-specific elements here .. check the kubrick/default theme single.php template for some ideas)

    functions.php (the bare bones widget code goes here)

    Make sure that you widgetize your themes, people really seem to like that; it will make your blog stand out among those that are not widgetized.

    Cheers will see how far I get! Thanks

    Oh, here’s one more nice article about WP themes that you might enjoy.

    Mastering Your WordPress Theme Hacks and Techniques

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I have created a custom layout now to turn it to a theme’ is closed to new replies.