Matt Read, The Weblog
Main Navigation
WordPress is not PHP
There have many concerns and question about the template system used in WordPress. Mostly the concerns are with n00bs and the complications of PHP. “I want to change this and that, but don't know PHP”. I hear this a lot. But the thing is, you don't need to know PHP to change the Templates in WordPress.
The Template System
Lets' start with “the Loop” as we call it. Probably the most confusing part of the Template for a non-programmer. The Loop looks like this:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
Template Section 1: post content Template Tags go here
<?php endwhile; else: ?>
Template Section2: no posts found stuff here.
<?php endif; ?>
It may look complicated, but it's actually quite simple. In Template Section 1, all the posts information will be displayed. Within that section we will put all the posts Template Tags, and our HTML to format them. In Template Section 2, we will display a message telling the user no posts were found, if we find none to meet their criteria.
Template Section 1: The Posts
We'll start with outputting the post tile. Simply add in the Template Tag <?php the_title() ?>. That will output the title of the post.
Now let's output the date of the post. Simply add the date's Template Tag <?php the_date() ?>. That outputs the date of the post.
We will also, of coarse, need the content of the actual post. Simply, again, add the Template Tag <?php the_content() ?>.
Now let's put it all together with some HTML:
<div class=”post”>
<h2> <?php the_title() ?> </h2>
<p> <?php the_date() ?> </p>
<?php the_content() ?>
</div>
And there's our simple template. Now let's add some more.
First let's add a link to the post, permalink as it's called, on the title. We get the actual URL, something like http://mysite.com/archives/2004/09/post-title/, with the Template Tag <?php the_permalink() ?>. We will need to put that in our <a href=””> HTML tag.
We also want to add in links to each page of our post, next page, previous page, etc.. We simply call another Template Tag, <?php link_pages('<p>','</p>') ?>. Now here's another confusion people have. We've added in, what programmers would call, arguments to our Template Tag. That is, we've added in '<p>', '</p>' to the brackets of the Template Tag. In this case we are just saying, if there are pages to link, output the page links with a <p> at the start, and a </p> at the end. Hence, enclosing it all in HTML paragraph tags. Most Template Tags have different arguments you can pass to them, causing them to format their output differently.
Now let's add in our new tags.
<div class=”post”>
<h2> <a href=”<?php the_permalink() ?>”> <?php the_title() ?> </a> </h2>
<p> <?php the_date() ?> </p>
<?php the_content() ?>
<?php link_pages('<p>','</p>') ?>
</div>
Now we have a fully functional Posts section, Template Section 1. Let's move on to Template Section 2.
Template Section 2: No Posts Found
For our Template Section 2, the no post found section, all we need to do is put in a message to tell the user nothing was found, to meet their criteria. Whether it was a search or a mis-typed URL. So let's use the following simple HTML:
<p>Sorry, no posts could be found to match your criteria.</p>
Now let's put it all together.
Complete Template
Putting all we learned above together, we get a nice simple Loop Template.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class=”post”>
<h2> <a href=”<?php the_permalink() ?>”> <?php the_title() ?> </a> </h2>
<p> <?php the_date() ?> </p>
<?php the_content() ?>
<?php link_pages('<p>','</p>') ?>
</div>
<?php endwhile; else: ?>
<p>Sorry, no posts could be found to match your criteria.</p>
<?php endif; ?>
As you can see, we have done no PHP coding, just some simple HTML with WordPress Template Tags added in.
Obviously this is not a complete template, as we have no header and footer containing all the <html><head><body> tags. But with some simple HTML and more Template Tags, and no PHP, we can easily add all that is needed for a complete HTML document. That's right, an HTML document, not a PHP script.
As we can see WordPress is not PHP. WordPress is powered by PHP, but uses a simple template system, easily modified by even the most novice of users. None of that complicated Perl code like MT has ... Yes, believe it or not, MT is also powered by a complicated programming language. The only difference is marketing. MT has been marketed as having simple templates with no programming skills needed. However, somehow, and I don't know why, WordPress has gotten a rap of being complicated and only for the hardcore programmers out there. But as we can see, using the Template Tags is extremely easy and requires no knowledge of PHP at all.
Changing the format and style of your Template is as easy as using a little HTML, CSS and Template Tags. Just like other Weblog systems out there.
However, as with any software, there is room for improvement.
Improving Templates
One of the problems with the WordPress Template System, in my opinion, is the default Template, or theme, itself. Specifically the sidebar, with all the is_*() functions. We shouldn't expect a novice WordPress user to understand what these functions mean. I would suggest removing all the if(is_*()) statements in place of a simple sidebar with just the essentials. Say, Search, Pages, Archives, Categories, Links, Meta information and take out all the complicated if statements and includes.
Another problem I see with the default Template is the CSS in the header. I think all CSS should be contained in the style sheets themselves. Again remove the if statements. When a user wants to modify the CSS it seems logical to have just the simple CSS in one place, to easily modify.
Another problem I see is with some of the Template Tags. Such as <?php bloginfo() ?>. Instead of having one function to display some necessary information, like blog name, description, url, etc., why not have specific tags for the highly used information. Like say, <?php blog_name() ?>, <?php blog_description() ?>, <?php blog_url() ?>, etc., to maintain consistency. For some of the less used information, charset, version, etc., the <?php bloginfo() ?> tag would be fine.
And some of the other advanced Template Tags in use in the default Templates, like <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>, should be simplified to not contain all those arguments. Maybe use <?php wp_list_cats() ?> where all those settings would be set in the admin area.
It would also be nice to try to simplify the loop, although I can't see any way of doing that now, to use as little actual PHP, like if else statements, as possible. Also take out the else, for when no posts are found, and always use the 404 template file.
The point I'm trying making is to take the PHP out of the Templates, as much as possible, so users don't get confused and think they need PHP skills to modify the Templates.
Those are just my thoughts on the matter.
Update:
Stuff I write doesn't usually get this much attention so I thought I should clarify some things, as I usually just write what's on my mind and do little to no editing afterwards.
The intentions of this article was not insult anyones intelligence by making something that does take time to learn, seem so simple a monkey could do it ( I like Monkeys ). I was just trying to show that the templates can be easy if you think about it the right way and not get stuck on all the PHP. ( and please be nice to the monkey, he's very nice and doesn't usually bite )
Update 2: If you need any help with your templates, or would like to learn more about the monkey, I'd be glad to help out. Just drop me a line.
Comment by Photo Matt » Not PHP
%2005-04-22T01:38:43-04:00 %EDT
[...] ogle Code Not PHP
April 21st, 2005 7:38 pm File under: Asides WordPress is not PHP, a basic template tutorial.
« More Google Code [...]
Comment by Mark J
%2005-04-22T01:55:24-04:00 %EDT
Mega, mega kudos. Required reading for people new to WordPress.
Comment by Robert Deaton
%2005-04-22T01:55:25-04:00 %EDT
Its about time someone posted something like this. If you ask me, theme developers need to stop their bitching and sit down for a minute and look at what they're doing before saying "ohgodidontknowhtisicandoitbetterstartbitching"
Comment by Erik
%2005-04-22T02:06:08-04:00 %EDT
Just wanted to say thank you!
That sweet tutorial really helped me start working on my wordpress site. Thanks!
:D Gorgeous site by the way...
Comment by Colorado Contemplations - Journal » Blog Archive » WordPress is not PHP
%2005-04-22T02:27:19-04:00 %EDT
[...] his is just what users need - a clear concise break-down of the template and how it works Matt’s Googly Site - WordPress is not PHP Thanks Matt for the tip [...]
Comment by Anonymous
%2005-04-22T03:21:30-04:00 %EDT
M.P.R.D
Comment by Roger Benningfield
%2005-04-22T03:25:56-04:00 %EDT
I dunno... I think you're greatly underestimating how intimidating this stuff is.
Those aren't "template tags", after all; they're function calls with pointy brackets around them, and thus bear only the most trivial resemblance to something more familiar, like HTML.
Now, I'll grant you, if you've got a user who doesn't even grasp HTML, WP's templates may be no more complicated that anything else. But is such a user going to monkeying with her templates in the first place?
Comment by Matt Read
%2005-04-22T03:46:14-04:00 %EDT
Roger, you're right, technically there are function calls. But technically a stop sign is a piece of sheet metal with paint on it, yet it's a stop sign. In this case those function calls are Template Tags.
If we look at any template system, technically all the template tags are function calls. They just get replaced with the content using some regex. So whether we're using
{$the_title}or<?php the_title() ?>, they are both template tags. The fact that the later is actual PHP is simply superficial. It's a template tag that just looks different than others, but effectively is the same.I'll I'm saying is that let's stop thinking of it as PHP, and start thinking in terms of templates. It's just an HTML document with some WP tags in it. There is no PHP coding required. Thinking like that, and helping people out by using generic "template tag" terminology, instead of using programming terminology, will help reduce the amount intimidation.
Comment by BoBB
%2005-04-22T03:50:57-04:00 %EDT
Awesoem write up Matt, This would have been incredibly useful when I started using wordpress because I just could not figure out how it mixed in the content with the formatting. Its come a loooong way since then
Comment by centripetalforces.com
%2005-04-22T04:24:16-04:00 %EDT
Unleashing the power of WordPress
It’s interesting what happens when one metaphorically “looks under the hood” at the code of WP.
I’ve discovered that WP has one fatal flaw in it’s presentation to the world. It’s billed as a blog, when in actual fac...
Comment by Indranil
%2005-04-22T04:36:44-04:00 %EDT
Bravo, really well explained. You've done a great job.
Comment by Florian Jung
%2005-04-22T04:48:09-04:00 %EDT
Remember that PHP was originally designed as a template system for use with HTML. Only later it advanced to a full blown programming language.
What I like in WP is that you can start in a very simple way, only using some of the template tags, but if you really need it, you can use the full power of PHP to do some magic without learning another easy (but also proprietary) language.
Comment by Jeff
%2005-04-22T05:23:25-04:00 %EDT
Matt,
I think your dismissal of MT templates' perceived ease-of-use as pure "marketing" smoke and mirrors is incorrect. MT indeed has a full separate and well-documented template "language". An MT user could go his entire life, creating and customizing templates, without ever encountering Perl or even knowing Perl is under the hood.
Yes, MT templates have a syntax of their own that may need to be picked up, but it's like HTML: angle brackets and attributes. (example: ) Not hard for HTML authors to see the similarity between this and html tags. And that's why it's easier to learn.
As mentioned earlier, the WordPress template tags are function calls. For a novice user who's never programmed before, the syntax is completely alien. Open and close parens, commas between arguments, what an 'argument' even is, if statements.
Comment by Ozh
%2005-04-22T05:40:49-04:00 %EDT
Nice article, I'll keep it in mind to redirect here n00bies asking for support about templates. Time permitting you could extend it to a more complete series of tutorials, don't you think ? :)
Comment by Anonymous
%2005-04-22T07:57:29-04:00 %EDT
Thank you Matt, i have a question about the navigation system in your site, how did you assigned an id for archives link? i tried to do that in wordpress but i don't know how, so i hope you can write something about it.
And sorry for my poor english
Comment by The NEW Powell3D Weblog
%2005-04-22T08:26:33-04:00 %EDT
Cloudy Layer Over the Blogosphere
Studying the Codex, from the very first: "What is a Blog?", and muddling through the cloudy issue of Pingbacks and Trackbacks, I'm making notes as I go, hoping that I can understand some of these things....
Comment by :) derBumi.de :: Michael Bumann » Templates for Wordpress
%2005-04-22T09:42:15-04:00 %EDT
[...] dpress For all of you who are thinking about setting up a WordPress Blog… WordPress is not PHP is a basic tutorial for creating templates… (via: photomat [...]
Comment by WordPress Is Not PHP, Help For Beginners by Blogging Pro
%2005-04-22T11:18:52-04:00 %EDT
[...] April 22nd, 2005 WordPress Is Not PHP, Help For Beginners Matt Googly has a nice article for WordPress and PHP newbies. He takes the mysterious [...]
Comment by 40 anni buttati » Blog Archive » WordPress & PHP
%2005-04-22T11:39:41-04:00 %EDT
[...] 8217;utente a conoscere PHP. Per fortuna oggi leggo un piacevole articoletto dal titolo: WordPress is not PHP dove l’auto spiega chiaramente la struttura del sistema di [...]
Comment by befuzled
%2005-04-22T11:41:47-04:00 %EDT
I suppose I am one of the n00bs, you speak of. Learned html then CSS several years ago. I know enough to have all my pages validate properly, yet have no ability explain what part of the language is what (ex: selector, element, property etc.).. I just know how to make it work. ..So I decide to use WP.. Oi vey, find it very confusing to change the template. Those "template tags" are making my head swim! I appreciate your suggetion to think of them as HTMl with WP Temp Tags... After many searchs to attempt to understand how to change my layouts, this has been the most benifitial. Still struggling to understand what I have to do to make it all work, but your words have at least given me the confidence that I might yet still be able to "get it".
Comment by Dougal Campbell
%2005-04-22T12:05:16-04:00 %EDT
If you haven't already, how about throwing this little tutorial up on the Codex?
Comment by eachman.com » Archive » Back away from the keyboard
%2005-04-22T12:06:48-04:00 %EDT
[...] nch such debate (1, 2). We seem to have stepped on some toes. I must admit, some folks are doing a fine jo [...]
Comment by Every Tomorrow » But I don’t know any PHP!
%2005-04-22T12:30:40-04:00 %EDT
[...] ant to change the template but I don’t know any PHP!” Matt Read has written an excellent tutorial to address this very question. Required reading for all new WordPre [...]
Comment by rob
%2005-04-22T12:48:01-04:00 %EDT
Meh, I still think that WP should use something like Smarty. Separating template logic from programming logic is much nicer.
Comment by Andy
%2005-04-22T12:55:12-04:00 %EDT
Great work Matt, this will be very beneficial to lot's of new users.
Comment by Lyle Schofield Technical Journal » Blog Archive » WordPress is not PHP
%2005-04-22T13:25:30-04:00 %EDT
[...] tant parts of the templates and resisting the urge to start dumping lots of PHP in there. Matt’s Googly Site - WordPress is not PHP [...]
Comment by Viewfinder Design » Blog Archive » Templates for Beginners
%2005-04-22T14:04:04-04:00 %EDT
[...] s for beginners who have never done it before and have never seen PHP. Matt Read has a good post on building WordPress templates for beginners who have never don [...]
Comment by Mark
%2005-04-22T15:53:06-04:00 %EDT
If WordPress Templates are not PHP, then why use the confusing
<?php ... ?>tag convention?Surely
<? the_title(); ?>would be less confusing for new users.Comment by Jemima
%2005-04-22T16:27:28-04:00 %EDT
My biggest problem with Wordpress when I installed it was the insane range of places from which to get information about doing the most simple things with the templates. I'll follow instructions and use a template system, regardless of syntax, but please please please don't make me check pages and pages of Codex, all named for people who know what they're looking for, a support forum, some old documentation, a plugin library, another plugin library, lots of individual homepages about plugins, articles like this... All just to work out how to get something that may or may not require a plugin but comes out of the box in MT. And none of the documents in these places consistently say which version of WP they refer to, so you can spend ages barking up the wrong tree. At least with MT, which I used to use, there's one page for how templates work. Full stop. As it happens, I know php and am committed to the idea of open source and a robust architecture, but the frustration of the documentation really made me think twice about it. And now the disclaimer: I like WP, I use WP, I gripe because I care.
Comment by the absent student
%2005-04-22T16:46:09-04:00 %EDT
This is great, and I wholeheartedly support all your suggestions for simplifying the template system further. I'd add that given the amount of PHP in the default template, the 'classic' theme is nearly always a better model for people wanting to build their own templates; it may not be as full-featured, but that makes it a lot easier to reverse-engineer.
Comment by Take My Advice - I’m Not Using It! » Blog Archive » CSS Three Column Liquid Layout
%2005-04-22T17:05:37-04:00 %EDT
[...] hose of you who have created a WordPress blog, Matt’s Googly Site has a great article on working with the WordPress template system. This entry was po [...]
Comment by Shayne
%2005-04-22T17:15:21-04:00 %EDT
Well, it still is PHP. I understand what you are doing. But, honestly, I would have chosen a different title. Maybe, something that's more like, "you don't need to know PHP to modify a Wordpress template."
Hrm ... any thought?
Comment by WordPress Reference Centre » WP and PHP
%2005-04-22T19:50:37-04:00 %EDT
[...] April 22nd, 2005An excellent tutorial on how to work with the PHP in WordPress. Even I could understand it - so it cannot be that har[...]
Comment by Anonymous
%2005-04-22T21:33:26-04:00 %EDT
f
Comment by weblog_netzgeschaedigt v2.1 » WordPress individualisieren
%2005-04-23T04:01:09-04:00 %EDT
[...] che info mel physik guests rss WordPress individualisieren Eine sehr schöne Anleitung wie man eigene Templates für Wordpress machen kann vo [...]
Comment by Echalicious » Word Press is not a PHP
%2005-04-23T08:10:22-04:00 %EDT
[...]
Echalicious About Archives Mix Download Contact
Word Press is not a PHP (via) (0) Watch this chick down and entire water bottle, heh [...]
Comment by Matt
%2005-04-23T13:56:01-04:00 %EDT
Mark, the reason we don't use the short opening tags (without the ?php) is that they don't work as reliably cross-platform
Comment by Dave’s Chalkboard » ExpressionEngine Maintanence Subscription
%2005-04-23T14:58:38-04:00 %EDT
[...] become much easier to understand. Then there are the folks that say they don't know PHP. You don't need to know PHP to work with WP templates. [...]
Comment by Netlex News » WordPress Theme : tutorials
%2005-04-23T15:21:12-04:00 %EDT
[...] on of a WordPress Theme: Part 1 urbangiraffe.com Dissection of a WordPress Theme: Part 2 WordPress is not PHP How To Blog By Email With WordPress 1.2.x [...]
Comment by Matt Read
%2005-04-23T18:20:32-04:00 %EDT
Jeff, I didn't mean to say MT template were not easy, cause they are very easy. I was just pointing out that eventhough the syntax is, as you say, alien to some, it is still easy to use.
Jemima, I agree with you, the documentation is all over the place right now. But there are many great people working on making that better.
Shayne, That would prolly have been a better title, but I like the sound of mine better.
Anonymous, the navigation is using PhotoMatt's Intelligent Menus Script. It's quite lovely.
Comment by Tech.Sports.Beer » WordPress is not PHP
%2005-04-24T02:03:03-04:00 %EDT
[...] you headed in the right direction. This is a must read tutorial is your using WordPress. Matt's Googly Site - WordPress is not PHP
No Comments » No com [...]
Comment by Ben's Blog
%2005-04-24T03:37:00-04:00 %EDT
Learn to write templates for WordPress
One of the major complaints with the two b2/cafelog derived blogging packages (b2evolution and WordPress) is that the template system is much harder to use than the MovableType template system. While there are some inaccuracies with the article which d...
Comment by jerome
%2005-04-24T05:52:22-04:00 %EDT
I've supported several people trying to make sense of their templates and I have to disagree with you: WordPress "template tags" are PHP functions, plain and simple.
The two biggest causes of frustration: 1. passing arguments to WP functions requires knowledge of PHP. Do you use single quotes? Double quotes? Include the parameter name? The average HTML/CSS coder isn't going to know this right off the bat. 2. too many WP functions output their own HTML tags, leaving users struggling to understand what the end result will look like.
As a final note, you really shouldn't start off your article referring to new users as "n00bs" -- it's demeaning and deters your target audience.
Comment by Life @ 15 Frames / Second » Blog Archive » Matt’s Googly Site - WordPress is not PHP
%2005-04-24T06:52:03-04:00 %EDT
[...] oogle Satellite Maps Matt’s Googly Site - WordPress is not PHP Matt’s Googly Site - WordPress is not PHP This entry was po [...]
Comment by Arteliance :: Top Links 05.04.16 - 23 :: April :: 2005
%2005-04-24T16:50:54-04:00 %EDT
[...] ick Up an Old-Fashioned Habit Figure drawing! DaveNet : The Web is a Writing Environment Matt’s Googly Site - WordPress is not PHP Tutorial on Wordpress templating system D [...]
Comment by Teeth Maestro » Guide : How to tweak WordPress Template
%2005-04-24T18:34:31-04:00 %EDT
[...] ns why WordPress isn’t PHP and how to easily change the WP templates. Read Article : WordPress is not PHP Crossoposted @ G3Technews
[...]
Comment by b
%2005-04-24T22:30:28-04:00 %EDT
i think its still PHP!
Comment by Matt Read
%2005-04-24T23:42:35-04:00 %EDT
Jerome,
"n00bs" I don't see as demeaning. I know I'm certainly a n00b in many many things. But yes, some may find it demeaning, bad choice on my part. Thanks for the input.
b, I don't.
Comment by The Benjo Blog » Blog Archive » A Busy Weekend
%2005-04-25T03:15:17-04:00 %EDT
[...] #8217;s Googly Site has a good post on why this shouldn’t deter the unitiated user: WordPress is not PHP. And for the non-nerds out there, here’s a link to a go [...]
Comment by James
%2005-04-25T09:13:28-04:00 %EDT
Is there a "complete" manual for Wordpress"? I read tutotial here and ther. I could not find a more systematic "howto". Am I missing something?
Comment by Ree’s geekblog :: links for 2005-04-25 :: April :: 2005
%2005-04-26T17:37:14-04:00 %EDT
[...] on. See the resemblance? (tags: popepalpatine image) Matt’s Googly Site - WordPress is not PHP (tags: wordpress template) Nick [...]
Comment by jarkolicious » probes » Wordpress Is Not PHP
%2005-04-26T23:42:26-04:00 %EDT
[...] Wednesday April 27, 2005
Wordpress Is Not PHP Wordpress is not PHP. Excellent article on the Wordpress template system. If you are [...]
Comment by Jauhari
%2005-04-27T07:19:06-04:00 %EDT
This Tutorial so Incridible for me, I learn something new from this Post
Thanks
Comment by Root
%2005-04-27T11:14:33-04:00 %EDT
This is awqesome. Beautifully written, very stylishly presented, and putting really useful but technical info in front of the end user in an accessible way. You have a gift my friend. The real joy is that you have articulated clearly what many of us in our stuttering way have been trying to say. For that I thank you. It is not surprising that all the usual suspects
are here in a supportive way. You deserve it.
Comment by Nothing fancy » WP not PHP ?
%2005-04-27T11:18:51-04:00 %EDT
[...] bringing down the wrath either of the Kamikaze or the Rednecks.If you are into themes then read all about it [...]
Comment by Dante
%2005-04-28T00:36:21-04:00 %EDT
Great article, terrible title. I suggest changing the title to "WordPress is not Programming".
Comment by Burning River Studio » Blog Archive » More WordPress Goodness
%2005-04-28T10:59:01-04:00 %EDT
[...] ss soon because it just makes more sense. I’ll add on to this post as I find more. WordPress is not PHP WP Admin Bar Unleashing the Power of WordPress More to come at [...]
Comment by A Whole Lotta Nothing
%2005-04-29T06:18:37-04:00 %EDT
links for 2005-04-29
Picking Designer Homes Off the Rack | Business & Economics | Deutsche Welle | World Famous designers are doing pre-fab plans. That italian one with the pool looks incredible. (tags: modernhomes ecofriendly prefab architecture) easter pig roast A frien...
Comment by Heybate.com - As Regular As Fibre » WordPress and PHP
%2005-04-30T00:23:38-04:00 %EDT
[...]
Links for April 29, 2005
Comment by the will to exist » Blog Archive » WordPress templates demystified
%2005-05-02T14:10:38-04:00 %EDT
[...] WordPress templates demystified
Comment by Petros Dimitriadis
%2005-05-03T13:08:17-04:00 %EDT
this article is quite useful as well http://www.urbangiraffe.com/category/software/wordpress/
Comment by [MoK] leonieke.net » Blog Archive » No. 1
%2005-05-08T17:47:17-04:00 %EDT
[...] or Your Own Online ArticlesGlassy ButtonsPNG HeadersEmulating position: fixed.htaccess tipsWordPress Template TutorialFloated LayoutReWrite Engine TutorialImage as buttons (IE r [...]
Comment by Denis de Bernardy
%2005-05-10T10:52:58-04:00 %EDT
WordPress is way too complicated for the average user. I tend to second Jerome's comment... No user in his right mind should ever need to configure a function to customize his WordPress install.
Consider these insights on improving WordPress' usability.
Comment by Webmercial.dk - Pushing the envelope of connectivity since 2001
%2005-05-11T14:55:07-04:00 %EDT
[...] f interessant indhold. S
Comment by SeattleBound » Blog Archive » Upgrade/Downgrade
%2005-05-12T05:05:31-04:00 %EDT
[...] s. Lucky for me, he was soliciting advice on cool plugins, good-looking themes, and useful tutorials. Upgrade. The theme list took me over to Alex [...]
Comment by 冰古Blog » Blog Archive » 有关wordpress theme的Tips 和 hack
%2005-05-13T07:25:41-04:00 %EDT
[...] dpress theme各文件的作用 Alex的theme竞赛(已结束,很多的theme供选择) WordPress(的theme)不是PHP Templates Template Tags
(Visited 5 times) [...]
Comment by Ron Pemberton
%2005-05-23T02:05:11-04:00 %EDT
Please write more tutorials. You have a talent for it, and I would gratfully appreciate someone with the moxy to do it with panache. Please pickup where Podz left off, with your presentation skills ou would most definately become famous for it. Thank you for your help. Kudos!!!!
Comment by HAMZA
%2005-05-23T20:34:26-04:00 %EDT
Comment by Car Loans
%2005-05-24T17:08:41-04:00 %EDT
It is nice to see such an active website with a wide range of topics and opinions. Makes for some good reading.
New and Used Car Loans nationwide.
Comment by templaterie blog
%2005-05-26T14:42:49-04:00 %EDT
Für Wordpress braucht es keine PHP-Kenntniss
Comment by Hotelblues.com » Blog Archive » WP Link
%2005-06-02T07:38:57-04:00 %EDT
[...] m I Thinking? WP Link June 2nd, 2005 by Turk WordPress is not PHP. This entry was posted on [...]
Comment by Fish Cakes
%2005-06-04T20:56:35-04:00 %EDT
Goddammit, this is exactly what I needed. The way people talk about (insert scary voice here) the loop makes it seem like some kind of monster that lives in a lair. But when you break it down like that, it seems much more simple. Thanks, at least now I partly understand what powers my blog!
Comment by Ka Webspy Personal Blog » WordPress Template Basic Tutorial
%2005-06-08T03:15:31-04:00 %EDT
[...] our guide in building Wordpress Template. It was written by Matt Read and entitled, “Wordpress is not PHP.” But, to tell you, I was not convinced by [...]
Comment by ee-kay-jay-el
%2005-06-22T11:56:08-04:00 %EDT
[...] be in. This site has all the functions that are included with Wordpress and I ran across Matt’s Googly Site which explains that Wordpress is not PHP. Thank goodness. [...]
Comment by Luke McOmber » Blog Archive » Wordpress 1.5 cont.
%2005-07-04T01:41:31-04:00 %EDT
[...] one of the hardest things to get right). I finally got everything working thanks to this blog I found through many different Google search queries. On a side note, I finished [...]
Comment by study web first days :: referrence for studying VietWordpress :: June :: 2005
%2005-07-06T00:13:44-04:00 %EDT
[...] dioblogger My blog relates to audioblogger research audioblogger Theme switcher on sidebar WordPress is not PHP Comments » The URI to TrackBack th [...]
Comment by Whatever the Pink Marshmallow says….. » Goory brains.
%2005-07-12T04:12:45-04:00 %EDT
[...] s, Work — Jolene /admin @ 2:12 pm
Comment by Dgold
%2005-07-22T05:53:06-04:00 %EDT
Thanks for the write-up. Now if you could explain how CSS fits in, using equally simple terms and clear color-coded examples, I'd be most appreciative! I've figured out how to move and place "chunks" of data on my site inside HTML (these template tags), and even how to write the arguments properly (whoo hoo I guess I did some PHP). But now I've got CSS div span class scattered around, that I don't know where to start, or even what program to open it with for making changes (Notepad? Firefox extension?).
Comment by Tim
%2005-07-25T21:51:39-04:00 %EDT
I thought it was PHP till I really started editing some of the actual php files that run WP. It was then I realized what PHP was. codex.wordpress.org is key. Thank you Matt R. for this post.
Comment by will the brand noobian
%2005-08-05T11:16:37-04:00 %EDT
Please put this on the codex. I've been trying understand that for 2 days. 2 long days. Great article. thanks.
Is there a model anywhere? what connects to what... what the hell are all those folders...
Comment by Andr
%2005-08-12T07:02:59-04:00 %EDT
FINE! I’ll just delete your sig. boooo!
Comment by Quy
%2005-08-22T02:05:53-04:00 %EDT
It seems that you know alot about wordpress. What is the php line of code that makes list. I want to put links to other site on my sidebar however I don't know the code to make the list expand. I have seem them in other wordpress sites. Please email me back a.s.a.p. Thank You, Quy
Comment by Fine tuning the world :) » Done messing up Wp design. ;-)
%2005-08-26T13:52:48-04:00 %EDT
[...] WP is not PHP [...]
Comment by WordPress Reference Centre » WordPress is not PHP
%2005-08-31T17:19:33-04:00 %EDT
[...] A very well put together article from Matt Read explaining how the structure of WP works. [...]
Comment by WordPress is not PHP at WordPr.ectio.us
%2005-09-26T12:01:23-04:00 %EDT
[...] http://mattread.com/archives/2005/04/wordpress-is-not-php/ There have many concerns and question about the template system used in WordPress. Mostly the concerns are with n00bs and the complications of PHP. “I want to change this and that, but don’t know PHP”. I hear this a lot. But the thing is, you don’t need to know PHP to change the Templates in WordPress. Technorati Tags: theming wordpress [...]
Comment by twisted.. 5th » Blog Archive » 템플릿 태그
%2005-09-28T09:22:23-04:00 %EDT
[...] 워드프레스(WordPress)의 개발자인 Matt가 자신의 블로그에 “워드프레스(WordPress)는 PHP 가 아니다.” (http://mattread.com/archives/2005/04/wordpress-is-not-php/) [...]
Comment by Skate fate! » Blog Archive » Matt’s Googly Site - WordPress is not PHP
%2005-10-17T05:51:33-04:00 %EDT
[...] Matt’s Googly Site - WordPress is not PHP [...]
Comment by poluz live? » In dirittura d’arrivo
%2005-10-26T13:30:55-04:00 %EDT
[...] Ormai è fatta, ho praticamente terminato la «sistemazione» del mio blog a questo indirizzo. La creazione di un aspetto grafico personalizzato ha riservato sorprese: WordPress, il motore che sta sotto a queste pagine, non è proprio immediatissimo da personalizzare dal punto di vista dei temi. Se ci si accontenta di un tema già fatto (ce ne sono parecchi ed anche molto molto belli) la cosa è banale, ma quando si vuole creare un aspetto proprio «da zero» ci si scontra con aspetti abbastanza criptici (almeno in un primo momento) come il loop (dei post e dei commenti), la miriade di file diversi in cui va spezzettato il template, e l’abbondante dose di codici «pseudo»-php da inserire. Inoltre, Codex, l’help online di WordPress, è un po’ caotico nel parlare della creazione di temi personali. È risultato di grande aiuto, invece, un post (linkato dallo stesso Codex) da Matt’s Googly Site, che in poche frasi riesce a fare chiarezza proprio là dove Codex fa confusione. All’autore va tutta la mia gratitudine, probabilmente senza di lui non avrei mai saputo da dove partire. [...]
Comment by Shadows » Blog Archive » WordPress is not PHP
%2005-11-24T16:52:14-05:00 %EST
[...] A very well put together article from Matt Read explaining how the structure of WP works. [...]
Comment by Shadows » Blog Archive » WP and PHP
%2005-11-24T17:13:43-05:00 %EST
[...] An excellent tutorial on how to work with the PHP in WordPress. [...]
Comment by 编程猪鸡的Geek生活 » The Loop
%2005-11-30T11:27:32-05:00 %EST
[...] Matt Read Loop Article (http://mattread.com/archives/2005/04/wordpress-is-not-php/) [...]
Comment by Valery
%2005-12-12T08:57:03-05:00 %EST
Very straight to the point and it answered my doubts!!
Comment by ECTIO
%2005-12-14T00:22:41-05:00 %EST
HOW TO: Customize Wordpress Part 1...
There are two main ways that I can see to go about customising themes in WP. I'm not really a theme user, as I tend to build from scratch, so it's difficult for me to say which way would be easier for everyone. One way is to customise the functionali...
Comment by incoherently surreal | Unleashing the power of WordPress
%2005-12-16T14:41:23-05:00 %EST
[...] Addendum: Shortly after posting this photomatt posted a link to this brilliant WordPress template primer. [...]
Comment by messett
%2005-12-19T03:34:02-05:00 %EST
Matt,
Thanks for the article. I wish I would have found it sooner. After countless hours of struggling to make sense out of all this I stumbled across your blog.
Definitely required reading for anyone wanting to use WordPress.
Thanks again,
Bill
Comment by Nothing’s Sound » Blog Archive » links for 2005-12-23
%2005-12-23T04:19:39-05:00 %EST
[...] WordPress is not PHP (tags: wordpress) [...]
Comment by The Musings of Supersteve3d » Matt’s Googly Site - WordPress is not PHP
%2005-12-30T07:39:17-05:00 %EST
[...] Matt’s Googly Site – WordPress is not PHP [...]
Comment by SenorKaffee
%2006-01-05T13:55:16-05:00 %EST
Phew, this article encouraged me to get going. All I want to do is using the blogging functionality of WP as a better news script on small webpage of otherwise static pages. After all that confusion it looks like it is actually not hard to do it. Just design the webpage in Dreamweaver as always and add the WP tags where they are needed. No need to implement the whole site navigation and static sites in WP.
Comment by How To Blog
%2006-01-10T17:13:43-05:00 %EST
WordPress 2.0 problems for google adsense users, and a workaround...
As just another reason to not upgrade to WordPress 2.0 (or even install it in the first place for now), it's been widely reported that WP 2.0's live preview feature causes serious problems for those bloggers who utilize Google's Adsense...
Comment by Neebone
%2006-01-11T08:08:51-05:00 %EST
People are getting hung up on semantics. Anything can be construed as anything. Ok we get that it's actually PHP but it's PHP templates so we can just say templates. And like Matt said, it's easier for beginners to understand that way.
I don't really like the lack of docs on the themes that come with WP. I can get around on my own but I dont really have that much time and would rather read a code map or something.
Useful article though...well done.
Neebone
Comment by 12iL » Blog Archive » wordpress theme
%2006-01-18T01:48:24-05:00 %EST
[...] 一直迷茫于这个WP的模版,今天看到一篇《WordPress is not PHP》,深受启发,原来如彼吖~早这样说不就完了。另外又顺藤摸瓜找到了《Dissection of a WordPress theme》part1 part2 part3,潜心研读,受益颇多,看样子终于有机会有自己的脸了~ olala [...]
Comment by WordPress 2.0 problems for google adsense users, and a workaround | How to Blog
%2006-01-30T20:49:53-05:00 %EST
[...] Unfortunately, this workaround still results in multiple problems, the first one being that there is a known bug with the is_preview() function in WP 2.0. Furthermore, the abovementioned code only works ‘inside the loop’ (see Matt Read’s post for help in understanding “the loop”, as well as the information on The Loop in the wordpress codex) [...]
Comment by Louis
%2006-02-06T11:48:06-05:00 %EST
I couldn't figure out how to install MT and I gave up before even trying very much. I tried Wordpress and I was hooked. It keeps getting better all the time. This tutorial is great. I have been monkeying around with template tags, for me it is fun to do. On the codex you can find all of the template tags, you can do copy and paste and just change the variables and you are set, in a way it is easier than doing html.
Thanks for helping me see things in a little easier light.
Comment by Ka Webspy » WordPress Template Basic Tutorial
%2006-02-07T02:20:48-05:00 %EST
[...] But that’s not a problem anymore. I found a blog which will serve as our guide in building Wordpress Template. It was written by Matt Read and entitled, “Wordpress is not PHP.” [...]
Comment by Ivan Minic
%2006-02-08T16:05:06-05:00 %EST
Comment by r.boylan
%2006-02-17T01:40:22-05:00 %EST
I ran across The Holy Grail of Layout over at http://www.alistapart.com/articles/holygrail and want to use it to create a WordPress theme. I can handle the CSS but I'm really frustrated by the lack of a foundation of template pages to begin the customization. I can see that starting with the Default theme or the Classic theme will eventually lead to what I want but my question is: Isn't there a set of foundation pages for developing a new theme? The Default theme is a double column within a single column and the Classic theme is the same. At many of the CSS sample sites, there are one column layouts, two column layouts, etc. Is there anything like that for WordPress? If so, where? Thanks, by the way, this was a marvelous article! (I have used PHP for some of my web sites so it does not scare me but your theme of it is NOT PHP was intriguing and you point was VERY well made.)
Comment by Robert
%2006-02-20T18:02:37-05:00 %EST
Great article. Thank you very much.
Comment by 지스토리 스튜디오 » Blog Archive » 워드프레스(WordPress)의 Template Tags
%2006-03-11T02:24:11-05:00 %EST
[...] 워드프레스(WordPress)의 개발자인 Matt가 자신의 블로그에 “워드프레스(WordPress)는 PHP 가 아니다.” (http://mattread.com/archives/2005/04/wordpress-is-not-php/) 라는 제목으로 워드프레스에서 사용되는 탬플렛 시스템에 대한 포스팅을 했습니다. [...]
Comment by 지스토리 스튜디오 » 워드프레스(WordPress)의 Template Tags
%2006-03-11T05:13:01-05:00 %EST
[...] 워드프레스(WordPress)의 개발자인 Matt가 자신의 블로그에 “워드프레스(WordPress)는 PHP 가 아니다.” (http://mattread.com/archives/2005/04/wordpress-is-not-php/) 라는 제목으로 워드프레스에서 사용되는 탬플렛 시스템에 대한 포스팅을 했습니다. [...]
Comment by 지스토리 스튜디오 » Blog Archive » 워드프레스(WordPress)의 Template Tags
%2006-03-11T06:15:17-05:00 %EST
[...] 워드프레스(WordPress)의 개발자인 Matt가 자신의 블로그에 “워드프레스(WordPress)는 PHP 가 아니다.” (http://mattread.com/archives/2005/04/wordpress-is-not-php/) [...]
Comment by Natali
%2006-03-14T03:23:15-05:00 %EST
Thanks so much for the good advice !
Comment by USTommyMC
%2006-03-16T03:43:14-05:00 %EST
I don't know who's intelligence got insulted by this awesome tutorial but I think you did a great job. The WordPress Codex is next to useless when it comes to us "noobee" or whatever it is you people call us.
I understand "The Loop" a hell of a lot better now after reading this than I ever did reading the Codex over and over and over. Thank you for taking the time to put this together.
Comment by USTommyMC » Links: 2006-03-17
%2006-03-17T01:32:14-05:00 %EST
[...] Matt’s Googly Site - WordPress is not PHP The WordPress Loop in plan English [...]
Comment by Anonymous
%2006-03-18T12:10:33-05:00 %EST
:P
Comment by Alan
%2006-03-18T23:09:37-05:00 %EST
Hi dude, I really wish to thank you for your knowledge and how you explain very well all the things...
I'm quite new in php, I'm a dj but for my site I use WD.
The problem is that I wish to modify my template, split the design,
or for explain better have more pages into one page.
Btw, your explain to how work WD was very useful and interesting and I'm writing to you
to thank you for your great work.
Best wishes and greetz...
Alan
Comment by Anonymous
%2006-03-21T06:08:29-05:00 %EST
Thanks man, you just helped me to integrate worpress in my website layout.
Comment by Anonymous
%2006-04-16T10:55:31-04:00 %EDT
워드프레스는 php가 아니다 (영문)...
워드프레스 개발자 matt가 워드프레스 테마의 loop에 대한 설명입니다. 제가 포스팅한 http://blog.naver.com/45036/20011961181 도 참고해주세요...
Comment by htdjm
%2006-04-16T12:35:17-04:00 %EDT
Comment by Stupid Wordpress Tricks » Wordpress Is Not PHP
%2006-05-14T15:02:21-04:00 %EDT
[...] This article, by Matt Read, explains the difference between Wordpress coding and PHP coding. It should be required reading for any aspiring Wordpress developer. [...]
Comment by 지난 여름 » 워드프레스 스킨 수정
%2006-05-16T16:45:10-04:00 %EDT
[...] ** 스킨 수정에 도움이 되는 글 http://mattread.com/archives/2005/04/wordpress-is-not-php/ (영문) http://www.wordpress.co.kr/forum/viewtopic.php?t=25 (번역/WordPress KOREAN 포럼) Tags :: 워드프레스 [...]
Comment by Abhijit Nadgouda @ iface » Blog Archive » A Look At Movable Type v/s Wordpress
%2006-05-17T15:23:37-04:00 %EDT
[...] I like the Smarty tags and how they can enable reduce the programming knowledge required for theme developers. Note that I am saying minimize, not eliminate. Even if they are just tags, there is still logic required to access data in a particular fashion and display it. Matt Read does quite well in convincing that the PHP functions can be considered and treated as tags. [...]
Comment by kan
%2006-06-09T08:56:50-04:00 %EDT
Comment by Sanjeev.NET » Blog Archive » links for 2006-06-07
%2006-06-12T03:23:20-04:00 %EDT
[...] Matt’s Googly Site - WordPress is not PHP (tags: wpfaq wordpress) [...]
Comment by Newbie Guide to Changing WordPress Templates - The Digg Effect - Search for Diggs or get Dugg
%2006-06-14T05:09:32-04:00 %EDT
[...] “I want to change this and that, but donât know PHP.” Matt explains why WordPress isn’t PHP and how to easily change the WP templates.read more | digg story [...]
Comment by Immobilien mieten kaufen inserieren
%2006-06-24T17:29:37-04:00 %EDT
nice plugin, thanks for work, more plugins for wordpress here : Word press and here P-Lugins
and custom themes here: Wordpress themes download
Comment by Someone who got the same message.
%2006-06-27T04:48:39-04:00 %EDT
Comment 57 appears may be social engineering spam. http://www.google.com/search?q=%22nice+plugin,+thanks+for+work,+more+plugins+for+wordpress+here%22&num=100&hl=en&lr=&safe=off&filter=0
Comment by Hi gais
%2006-06-29T18:24:32-04:00 %EDT
http://www.bochka.us/stevenson-silverado-649/index.html Hello, it's very good site too: www.bochka.us/stevenson-silverado-649/index.html
Comment by Ivan Minic
%2006-07-01T18:39:38-04:00 %EDT
I get this stuff all the time.. almost every serious sofware has similar template system and all people look is extension..
Comment by Sweet
%2006-07-02T13:09:03-04:00 %EDT
Hello and congratulations! nokia6630
Comment by Mr Green
%2006-07-10T20:23:22-04:00 %EDT
Hi Matt, regarding your update 2 =)
I was trying to override my default admin setting -> 2 posts displayed per page for the archive (by author) template. So I tried the getposts command. The loop I tried does not work, the postauthor=$curauth->ID is not working. Could you tell me what I did wrong please?
ID'); foreach($posts as $post) : ?> " rel="bookmark" title="Permanent Link: "> , inComment by Mr Green
%2006-07-10T20:24:46-04:00 %EDT
um, sorry.. the code I posted turn out wrong :} here:
ID'); foreach($posts as $post) : ?>
" rel="bookmark" title="Permanent Link: "> , in
End Loop -->
Comment by Mr Green
%2006-07-10T21:12:29-04:00 %EDT
sigh... please visit, http://paste.uni.cc/8669
for the code I used =)
Comment by Mr Green
%2006-07-10T21:15:58-04:00 %EDT
In case you would like to see the entire template:
http://paste.uni.cc/8670
Comment by Anonymous
%2006-07-12T18:03:34-04:00 %EDT
idiot
Comment by Anonymous
%2006-07-12T18:04:40-04:00 %EDT
for($i = 1; $i
Comment by Anonymous
%2006-07-12T18:04:59-04:00 %EDT
l
Comment by 憐惜·零星 » 向导: 自定义 Wordpress 第一部分 [翻译]
%2006-07-18T22:19:39-04:00 %EDT
[...] 我最近读到一篇日志 WP IS NOT PHP (WP不是PHP - 目标网页是英文,有兴趣可以游览),但我认为这个标题有些过分,举个例子说说: <p><?php thedate() ?></p> <?php thecontent() ?> [...]
Comment by fsd
%2006-07-21T05:55:50-04:00 %EDT
dsfsd
Comment by Blog » Blog Archive » Free Online - Web - Hosting
%2006-08-02T18:50:33-04:00 %EDT
[...] http://mattread.com/archives/2005/04/wordpress-is-not-php/trackback/ [...]
Comment by Qoli's Blog
%2006-09-15T07:27:46-04:00 %EDT
[...] WordPress 不是PHP 原文地址:Mattread.com时间:2005年4月21日作者:Matt Read [...]
Comment by Clair
%2006-09-21T06:36:41-04:00 %EDT
I need some help with templates in Pages. I have been using WP as a CMS and would like particular pages and their children/child pages to use certain templates. The thing is that I'd like to find a way to set the templates at one go and not set them for each page. Is that possible? How? Thanks
Comment by j4s0n
%2006-09-22T08:19:55-04:00 %EDT
I don't understand. Wordpress is PHP and will be, and it's just great to have the templates in PHP compare to other CMS/Blogs around there. I aint catching this.
Comment by Dotyyw
%2006-09-27T19:19:51-04:00 %EDT
Thank you!!! I'm impressed! Really useful! [URL=http://www.mp3extramusic.com/v.htm] heaven mp3 download [/URL]
Comment by Azzurra
%2006-11-04T23:14:10-05:00 %EST
Buon luogo, congratulazioni, il mio amico!
Comment by Sindhu
%2006-11-15T22:56:24-05:00 %EST
ur wierd man!
a n00bie wouldnt know what a loop meant. for all people wanting to mess around with theme n php, youve to have some idea about programming , say if u know C , its better. i struggled without C, once i knew, i couldnt easily figure out stuff,
but u dont neccessarily have to know C, if you do then thats great.
Comment by Kirill
%2008-04-06T11:43:55-04:00 %EDT
I was trying to override my default admin setting -> 2 posts displayed per page for the archive (by author) template. So I tried the getposts command. The loop I tried does not work, the postauthor=$curauth->ID is not working. Could you tell me what I did wrong please?
Comment by Red Roters
%2008-09-17T10:18:37-04:00 %EDT
yea im having the same problems any help?
Comment by Program Bul
%2008-09-29T08:23:16-04:00 %EDT
Thanks, good article.
Comment by Gibby
%2008-09-29T08:35:41-04:00 %EDT
I think, that Smarty is more useful thing (smarty.php.net)