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

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.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.4.24.2525\r\n            </div>\r\n                <div id=\"additional-notices\">\r\n                    WordPress is a trademark of the WordPress Foundation, registered in the US and other countries. This site is not affiliated with the WordPress Foundation in any way.\r\n         "], "copyright__copyright__copyright": ["dpress.org/Function_Reference/load_theme_textdomain\nhttp://codex.wordpress.org/I18n_for_WordPress_Developers\n\nFor 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\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}