cc licensed flickr photo shared by gianΩmerz I’m regretting not getting started my series on WordPress 3.0 and custom content types; a big chunk remains to be explained, but that has to wait till after a few days of vacation. But there was something Jim Groom mentioned that I was going to tackle later, but can inset now; it’s a powerful piece that’s been there quietly, that I used on the MIDEA site– Child Themes. In all of my WordPress work I find a theme I like, download it, and then start ripping it to shreds. This makes it near impossible to update if the theme later changes. Children take care of that. What happens is that you download the Perfect Uber Theme and install it. But rather than start tinkering, you make another directory in the theme directory, call it something memorably like “Child of Bava” (mine is called [...]
CogBlogged Tagged ‘wordpress’
Setting up Custom Content Types in WordPress 3.0
cc licensed flickr photo shared by TakenByTina My previous post just outlined the kinds of things I put into a new site created with a beta version of WordPress 3 (I started with the first beta and honestly, it had more polish than most finished products) – I actually did not tell you much. Now it’s time to get out and start hacking. In this post, I’ll detail what I did to create three content types on the MIDEA site. You will see code, raw PHP out in the open. While there is an excellent plugin for creating custom content types (I did try it out and also parsed through the code to see what it did), it only did about 15% of what I wanted. Creating the content types are easy. But the plugin does nothing to help you add the form elements to create, edit the extra meta [...]
Building a Site with New WordPress 3.0 Content Types: Part 1 of Several
I’ve been happily tinkering with the beta version of WordPress 3, down in the bowels of the code, mixing unmarked vials of PHP over open flames, etc for a brand new NMC site. The main thing I have been working on are exploiting the feature to create my own types of content with their own properties. Essentially up to know you could create two kinds of content- posts and pages, with pretty much the same feature. Any additional descriptors one wanted to add needed to be done via custom fields. The idea is now, I could create a kind of content, say to build an encyclopedia of dogs, and use all of the WordPress features to make an entry (title, post/content, tags). But to my Dog content type, I could also add additional fields, like radio buttons to classify them by “small”, “medium”, or “large”, a field to enter a [...]
WordPress Code Circles
cc licensed flickr photo shared by M.H.ick9s Arrgh, just spent about an hour and half chasing myself in silly code circles. Not that it matters, but just to document my sanity/lack thereof… I have a few WordPress pages hanging off the top banner, and I’d previously had them use PHP code in the pages, using one of the plugins that allow you to put executable PHP in your stuff (yes all warnings apply, you need to know what you are doing, security panic yadda yadda). I think I was using PHP Execution which, like Exec PHP just lets you put the code in the page including all the <?php … ?gt; stuff and let it go. However, I often write posts that have PHp code in them, and I really like using the way the Syntax Highlghiter Plus plugin displays code, e.g. <?php // array of all years data to [...]
Found. The WordPress Search Solution. Hewn by Hand.
cc licensed flickr photo shared by jbelluch I’m hopeful I have an optimum (or optimummer) search solution for my blog- not that I care if you can find anything here, but its important that I do. Back in March I vented my frustration about the limits of WordPress search, yet despite the experiments with plugins, none of them really worked for me, and one of them just spun wheels trying to index my site, and just ended up bloating the database. But in about 45 minutes of tinkering this afternoon, I have an approach that gives me exactly what I wanted, and does not need any plugins. This will work only for a self hosted WordPress blog, and you will have to do a little bit of manual page creation, touch the code, and edit your templates. Is anyone still there?
Roundabout the WordPress Hackery
cc licensed flickr photo shared by theilr It’s been a while since I did some WordPress hacking, and today I think it showed. Like a good bone I could not let go of a niggling little problem, and then after going around in circles, I found an obvious way that was much more simpler than where I was headed. But there are things even learned in a few trips around the roundabout. Here’s where I drove around in circles today… for a while, I have been publishing web versions of the NMC Horizon Reports in CommentPress format at http://wp.nmc.org — this is very useful for publications since it allows comments to be attached to individual paragraphs, so they are tied at a more micro level to the content. (Yeah they are in the old CommentPress mode, I know I should be using the newer digress.it and am ready to publish [...]
Ye Old WordPress Blog Search Thingie
I have an old JavaScript bookmark tool I made five years ago– it allows me, from no matter where I am on the web, to either select some text in a page (or enter in a box) and run a search for it in my own blog. This came from realizing that the basic wordpress search URL was always something like: http://www.myfreakyblog.org/index.php?s=cheddar+cheese And with my mediocre JavaScript tools, I made a site that allows anyone yo make one for their own blog– the Make A WordPress Search Bookmarklet tool — which to my utter surprise, still works. It’s prety easy- you enter the name of the blog, its base URL, and click “Build The Bookmark”- drag the generated JavaScript link to your toolbar, and you are done. So for example, let’s say I have some B movie blog I want to make the tool for, I enter its name, the [...]
Digging Out from a Blog Crash
cc licensed flickr photo shared by foreversouls My blog crashed this afternoon. I was not driving, but with some lucky bits of intervention and guessing, I was able to roll it over and get it back on the road. This was after spending a good chunk on Sunday on a side blog that had gotten hacked (By the way, Donncha’s Exploit Scanner was a crucial key to cleaning up that one, tho it needs a bump to WP 2.9.1). But today’s episode of “Blog and Order” was a different game. I thought I’d share some of the things I did- but keep in mind that when something like this happens, there is rarely one single recipe; and like most, I try all kinds of things, though the whole box of tricks at the wall and see what sticks. So I went to my own blog today to look something up [...]
Dead Blog Dog
cc licensed flickr photo shared by Carplips I have had a hair tearing hacked WordPress blog experience here over the last 2 days. I don’t know why, but it really knocked my knees out, and I am reeling to figure out why this has gotten to me on an emotional level. That even sounds silly seeing those words. But I am not rolling over. Yet. It all surface, like many things, in the act of doing something else. I left a comment Sunday on someone’s blog about something rather inconsequential, and got an email later asking me if I knew my blog was riddles with spam links. Sure enough, I looked at the source code, and at the bottom, written with CSS to hide the display (but not hide from google) was a long list of every variation of PPC (pill/porn/casino) link one could imagine, maybe 120 of them. It’s [...]
Hashtag Per Post Works!
Darn, I should have gone by my usual route of trying things before I blog about them. In a previous post, I speculated about using WordPress and the Twitter Tools Plugin to add a hashtag to posts to either aggregate them (among multiple bloggers) or segrate them (for a single blogger with several sites). My idea was to insert the hash tag on all posts. Tony Hirst speculated it would be better if on each post you could optionally add a new, different tag. I looked at the newest version of Twitter Tools plugin and noticed that there was a field now to add a hashtag. My first thought was “this is nice, but what good is it to add the same tag on every post?” So I set out to use this on my side blog, my I Hate Running one. I set it up so that every post [...]




