Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to convert a HTML/CSS layout i made into a WordPress Theme, But i don't know any PHP, I have a basic idea of the structure of a WordPress Theme, So i was wondering if i could just slice my HTML template into a header.php, footer.php, sidebar.php and index.php and just copy paste all the php code bits from the default twentyten theme? I've been going through the twentyten theme files and i have come across some bits of code where it says 'twentyten', for example:

// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
    echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );

and

<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>

Can i just replace the text that says 'twentyten' with my theme's name? Or should i just leave it that way?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You have the basic idea. You can build up a theme using html and css as you see fit. That controls the look and feel basically.

The php brings the content and function. I learned to make themes by picking at other themes until I figured out what the php did. You can look up each template tag in the codex to get an idea of what it does

The 'twentyten' you refer to would do nothing in your theme unless you do it properly. Nor would changing it.

that refers to the text domain...you can see this in twentyten's functions.php

    // Make theme available for translation
// Translations can be filed in the /languages/ directory
load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );

it is the textdomain for being able to translate the theme. In your example code it is so that the word Page can be translated to the user language

http://codex.wordpress.org/Function_Reference/load_theme_textdomain
http://codex.wordpress.org/I18n_for_WordPress_Developers

For personal themes you will never release, it's not necessarily so important. But it's great to learn how to use. And its necessary if you ever plan to release a theme

share|improve this answer
    
TIP: Put two spaces(markdown newline) after the first link, and the second link will link properly(because they were on adjacent lines you need to end any line not the last with two spaces). –  t31os Mar 16 '11 at 13:30
1  
Thank you sir! that's the second time I've done that.... newb mistake! –  Rev. Voodoo Mar 16 '11 at 13:38
    
No problem, markdown is a little wierd to use at first... :) –  t31os Mar 16 '11 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.