In a current WordPress project, we wanted to have a permalink to a photo gallery filled with images (attachments) for a post. WordPress supports permalinks to single attachments, such as site.com/single-post/attachment/flower That’s cool. However, we wanted something like this: site.com/single-post/photos … where all attachments would be listed. The /photos part is called an endpoint. So how do you add them in WordPress? And how do you assign this endpoint to render a specific template file? Relevant APIs After some quick googling to find out if this was possible and worth a try, I found the Rewrite API in the Codex. …
I'm Johan. I'm a Jack of all trades, interested in interface design and software development.
Read my articles, or get to know me better
I'm @johanbrook on Twitter. I'm on GitHub, Flickr and Dribbble
Latest posts
-
-
Linked http://www.impressivewebs.com/things-we-wish-clients-would-say/ “Can you make the logo smaller?”
· Permalink“Things we wish clients would say” include some gems which would be like sweet, soft conditioner to designer and developer’s ears.
-
Linked http://37signals.com/svn/posts/3071-why-we-dont-hire-programmers-based-on-puzzles-api-quizzes-math-riddles-or-other-parlor-tricks Hiring developers 2012 style
· PermalinkDavid Heinemeier Hansson from 37signals on hiring developers.
I’ve known fabulous programmers flame out in the quizzing cage and terrible ones excel. So unless you’re specifically hiring someone to design you the next sorting algorithm, making them do so on the white board is a poor gauge of future success.
I’ve read many articles on this subject: how to ace an interview for a developer position. Even for front-end positions, questions about algorithms and similar “puzzles” arise. Sorry, but I actually think you have to tailor the interview material for the practical assignments the interviewee will receive.
Today, most developers (at least web developers) don’t write computer science-y stuff all day long. We solve real world problems, read documentation, build scalable systems, cooperate (social skills are vital!), implementing other people’s code, and more. Quizzes are fine, as long as they are relevant for the actual work I am going to do.
(Also: see 37signals job listing for an interface designer position some time ago, I wrote about and linked to it).
-
Linked http://www.reddit.com/r/confession/comments/nxdzz/im_not_as_smart_as_i_thought_i_was/c3d91jl Advice for university students: “I’m not as smart as I thought I was”
· PermalinkThe students that are successful look at that challenge, wrestle with feelings of inadequacy and stupidity, and begin to take steps hiking that mountain, knowing that bruised pride is a small price to pay for getting to see the view from the top. They ask for help, they acknowledge their inadequacies. They don’t blame their lack of intelligence, they blame their lack of motivation.
Great text from an MIT grad about the challenges and feelings during his freshman year at MIT. Many wise quotes.
-
Linked http://csswizardry.com/2011/12/measuring-and-sizing-uis-2011-style/ Measuring and sizing UIs, 2011-style
· PermalinkHarry Roberts (“CSS Wizardry”) wraps up the current state of measuring on the web, which I personally enjoyed reading about. I often dabble between doctrines when setting measures and sizes of type, margins, paddings, widths, etc. etc., and a concluding write-up was welcomed.
-
Linked http://warpspire.com/posts/kss/ Writing documentation for CSS – Knyle Style Sheets
· PermalinkCSS has long been the “language” of terror for more sophisticated developers. CSS can be messy, ugly, illogical, and utterly wonderful to work with sometimes. Recently, tools like SCSS and LESS have emerged which let us write more structured CSS in a DRY way (I’ve written about it before).
But we still have the problem with the actual “content” of the CSS. All the classes, IDs, and tag names.
Hell is other people’s CSS
it’s said, and it’s true. Really bloody true. Trying to comprehend a semi-large CSS code base is like putting your feet into wet socks. If it’s one person writing the CSS, it’s he who’s got the structure in his head. He models it according to his views and sense of organization).Hence, Knyle Style Sheets, is an interesting idea. It’s basically like a style guide – documentation – for a site or app’s CSS. Go ahead and read about it, and check out the project on GitHub. I really like the thinking behind this, and would consider it a necessity for larger projects.
-
Linked http://www.usabilitypost.com/2011/11/11/timeless-fashion/ Timeless fashion
· PermalinkDmitry Fadeyev:
His [Ive's] latest designs are a tribute to Dieter Rams, who sought to produce the timeless through ruthless, methodical elimination. Rams approach produced work that was clean, simple and could stand the test of time because it was not a work of style but his best solution to the given problem.
Call me a boring northern European, but I like the clean, simple, functional industrial designs of Braun, Apple, IKEA, et al.
-
The Anatomy of a Perfect Web Site
· PermalinkMany sites on the web are good. They are well-designed, clear, have great information architecture and are easy to navigate. Often, web designers emphasize the “design” part too much, and neglect the other equally important things. However, there are sites which aren’t that aesthetically pleasing, but still are the best sites in the world. They may look like a big, sad bag of wrestling underwear on the outside, but their underlying user experience is really, really refined, and thus makes the appearance part fade away while visiting the site. How and why? A case study: “Introduction to Computer Science using …
-
Linked http://seldo.com/weblog/2011/08/11/php_needs_to_die_what_will_replace_it PHP needs to die
· PermalinkGreat article on why PHP must go, and what the alternatives are – if there are any at all. PHP is a pretty neat language. It’s available on almost every web host around the world. It’s really easy for beginners to setup, write code, and publish it. Still, PHP is starting to become dreaded, unwanted and hated among serious new-era web developers. The familiar C style syntax is becoming old, there’s a lot of noise in the code, and a lot more pet peeves which are forcing developers to other languages, such as Ruby, Python, and in recent days Javascript.
I can knock out a good website in an hour in PHP, and an excellent one in a day or two. Its performance characteristics are well-known and understood, so I can make it scale pretty much indefinitely. Every developer we’d want to hire knows it, and every system we’d integrate with has a wrapper library written in it. I am trapped by the convenience of PHP in a language that is losing its suitability for the task.
What’s happened with PHP is that we’ve become too convenient and lazy. Everybody uses it – why change? It’s an evil spiral I don’t want to go down with.
“PHP needs to die” is perhaps a bit harsh, but I definitely think it shouldn’t be the first choice of web server language when beginners grow out of HTML and CSS (it is actually very much a de facto language). In a perfect world, web hosts (even shared hosting providers) would offer Ruby and Python out-of-the-box without any addon fees.
I want a language that assumes everything I will be building is an MVC web app, and builds that right into the core language, not just a library.
To become the Number One Web Language, it has to look on what made PHP big: drop in functionality, straight forward documentation, simple hosting, and a not too steep learning curve.
-
Subtle updates to Chrome 14′s Web Inspector
· PermalinkChrome 14 landed in the stable channel some days ago, and brings some better OS X Lion support, as well as a Web Audio API and “Native Client” (run C/C++ code in the browser). I also noticed a difference in the Web Inspector. I don’t think this have been here in previous stable builds. In the Elements tab, to the right, two new buttons are added: A plus sign for adding a new style rule (previously in the cog wheel menu) A “Toggle Element State” button The “Toggle Element State” button is interesting, and useful: it lets you activate different …