I’ll be keeping things as conceptual and straightforward as possible. That way, the actual usage of the various template tags and functions come into play, rather than being obscured by other code that won’t matter in the long run. That being said, you should be aware that the following examples include localization tags and both template and conditional tags that you may not be entirely familiar with. Most of the latter two categories speak for themselves, but localization may be a bit harder to grasp. You’ll get to the details of that later on, but for now you only need to know that when you localize, you either wrap the text/code within _e() or __(). You use __() within PHP code, while the former is more or less used anywhere. Add a textdomain and you’ve got the basics, like this:
<?php _e('This text can be localized, mate!', 'the-textdomain'); ?>
Both _e() and __() rely on the premise that the text or code you can localize gets passed first, and then the textdomain that should be used. In the Notes Blog Core examples, the textdomain is called 'notesblog', so it would look like this:
<?php _e('This text can be localized, mate!', 'notesblog'); ?>
Then, thanks to language files, users can fully localize the theme.
Not all sites need comment functionality, but chances are that a lot of the sites you’ll be building with WordPress will. Most, if not all, blogs allow readers to comment on the posts, and the same goes for the vast majority of editorial sites out there, from newspapers to magazines. It is just a good way to connect with the readership, and while the sites in question may have completely different motives for doing this, and may have different comment policies, the basic functionality remains the same. From a WordPress theme designer’s point of view, comments can be a bore, mostly because making them look good can be a problem.
The actual code isn’t all that hard, though, and if you like the default comment view (as featured in the default WordPress theme) you won’t even have to create the comments.php template file. We looked closer at such a file in the “A Closer Look at the Notes Blog Core” section earlier in this article, so we’ll gloss over that part for now and look at the comments from a less technical point of view for a little while. These are the most important things to consider when designing the comments section of a site:
Think the comment functionality through and you’ll be fine. You’ll also have a much easier time designing it, and possibly altering the functionality as well.
Our website is not responsible for the information contained by this article. Articleinput.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
Note: This article was sent to us by: Keith Branger at 05172010
1. Working with Image Galleries in Wordpress
All articles are property of their respective authors. Please read our Privacy Policy!
© 2009 ArticleInput.com.
Partners: Damenmode