Category Archives: WordPress

PHP Syntax Questions

I’ve been hacking around with the WordPress conditional tags and I’ve started to get the hang of it. However, I have never really known much of PHP programming and I don’t know jack about the syntax at all. I’ve spent too much time aping existing code’s syntax and this inquiring mind would like a hand-out of definitive info once and for all. I’ll be using a few shortcuts with syntax but I hope I can be understood anyway.

First, we have the conditional. Is there an important difference between the following two examples?

< ?php if (condition) : ?> [HTML Output] < ?php endif; ?>

< ?php if (condition) { ?> [HTML Output] < ?php } ?>

WordPress also has a conditional function to determine a page by ID or by slug. For example: < ?php is_page('about-the-author') ?> indicates code related only to a Page that has the slug of “about the author.” My sidebar file has a chain of “if” statements (only two are shown in the example):

< ?php if ((is_page('about-the-author')) { ?> [HTML Output] < ?php } if ((is_page('colophon')) { ?> [HTML Output] < ?php } ?>

I suppose the syntax is right since it works, but is it good syntax?

Not worth it!!!

I saw this at Meryl’s:

…one of the things preventing me from joining Pajamas Media is that they want full control over my RSS feed, including my only being allowed to send post titles via RSS.

So PJM will offer you money but limit you to sending only post titles in the feeds? Long have I railed at independent content providers—bloggers, yes?—who don’t publish their whole site content because they want people who use feed readers to show up on their sitemeters and add a click to the team. To what end does Pajamas Media want to limit the syndication of a member site’s data? I would like to know, but the fountain from which the benefit of the doubt flows is running low…

Split personality

I got my account yesterday.

It runs nightlies (!!!) or very recent updated version of WP-MU, with the 1.6 interface. It’s pretty snazzy, and since it’s not something I can customize, I can concentrate on writing. Truth be told I really needed that other location simply because sometimes it feels stupid and incoherent to have a post about my life’s details proceeding a political post, or a photography post.

Photography gets crossposted, but the J-Word blog gets its material from Flickr. Commentary on pop culture and some politics stay here. Life bites go there, unless it’s important enough to be cross-posted across two sites.

Donncha is one pretty kewl guy; I filed some sort of bug report last night at the feedback function and he even sent me a reply about it.

Last thing… about them themes, no hatin’, they’re all pretty hot but yo, let’s get a theme in for something a bit more dark, ya? Ocadia is the darkest theme they got. Everything else is a bit too light and airy. If you guys are taking contributions I’ll be glad to contribute an Ark port for that actually uses the nested menu structure, just coz’ I’m sweet like that. It’ll take about two weeks to do, but hey, I’m busy. And since it’s being contributed to I won’t have to suffer seeing it hacked to death by everyone else, yes?

Who knows what evil lurks in the hearts and minds of men? The Shadow do!

Midday the darkness is high in the sky. Peace out.

The rising WordPress monoculture

Are we really ready for it? Two years ago when I was using B2 I, like many, understood the folly of generating individual HTML files that filled up server hard drive allocations. Later on we saw comment spammers shutting down entire servers by turning the rebuild process against its owners. We also saw hundreds upon hundreds of comments pages littered with so much spam that their owners were not able to stem the tide.

Now, WordPress, which is not just free but also open source, and under the most open of sources, the GPL, is gaining significant visibility. With the coming of Version 1.6 we are going to see even a lot more websites that use WP not just as a blogging tool but also a site management tool.

We are well aware that security vulnerabilities in WP are corrected ASAP. But are we as a community of WP users prepared for the unprepared-for vulnerability that may arise someday?

I am still and most possibly always will be, an avid supporter of WordPress, and though there are parallels in terms of distribution and market share, we are not as unprepared as the rest of the developers were two years ago. We shall see, I guess…

WP Bleg

Why, this renowned (but not self-proclaimed) WP “guru” needs help of his own. Anyone care to help? I want to move entire masses of posts from one category to another, because I’m about to delete quite a few categories in my taxonomy.

Better yet, a plugin that can do this painlessly would be bonerrific.

I should be doing this. For real.

Many of us WordPress users use a variety of hacks, plugins and customizations. Many are open-source, but I have the hardest time looking for references in their blogs about them. I know that open source does not require a link, but in the interest of sharing with other people just how awesome your stuff is—stuff that you did not write on your own by the way—it could be nice to post links to the resources in some sort of colophon, eh?

I should start by example. Will work on it later and try to get some sort of listing of the customizations I have.