dave seah: better living through new media Filter Navigation Design Portfolio The Printable CEO Series The Printable CEO Series Compact Calendar Compact Calendar Back to Home Page Admin:Login

Weekend WordPress Tweaking

POSTED 02/13/2006 UNDER BloggingGweeping

Finally added "Asides" this weekend, which will allow me to post quick notes on the main page without muddling up the RSS feeds. I'm hoping this will encourage me to post when I'm too busy to write a full article. Eventually I'll move the asides into their own sidebar, but that will have to wait until I do a full redesign.

Boring technical notes follow.

I followed the instructions at The Wordpress Codex, which are based on Matt Mullenweg's original hack. This is the first time I've actually modified my WordPress loop with conditional post formatting, so that was an informative experience.

To arrange it so that the RSS feeds didn't get polluted with these tiny posts, I followed Phu Ly's directions. So theoretically, neither Feedburner nor 9rules automatic content snagging will be affected. One thing that I screwed up at first was assigning multiple categories to the Aside post (like Aside, Tricks) which caused the post to show up in the feed after all. Oop.

I had one snag getting my Markdown-formatted content to appear correctly. I wanted it all to appear in a nice compact single-paragraph block. However, I wanted to use the Markdown-style hyperlink notation. The default way that the "Mullenweg method" uses is this:

    echo wptexturize($post->post_content);

...which echoes the unfiltered contents of the post and exposes all the raw Markdown formatting. SO I tried:

    the_content();

...instead, but this inserts extra paragraph tags and thus inserts extra linefeeds and space. I finally did the following:

    if (function_exists('Markdown')) 
        echo strip_tags(Markdown($post->post_content),'<a>'); 
    else the_content();

This calls the Markdown filter directly, assuming the filter exists. The resulting text is then stripped of all tags except for the listed tags. If the Markdown filter doesn't exist, it just runs things through the_content() and I accept the unpleasantness of the extra linefeeds. I suppose I could just echo the post_content in that case instead of running it through the_content().

UPDATES

  • I added some AdSense code for QuickPosts that should only be visible if you click all the way down into the permalink. What I'm wondering is whether these quickposts will be indexed by search engines and draw clicky traffic. Regular readers shouldn't see them at all. I assigned a different AdSense channel to these ads to try to track this activity.

  • I burned a QuickPosts feed through Feedburner, and have added that to the Feeds section of the sidebar. Also tossed out some older subscription link options.

  • I redirected http://davidseah.com/syndicated and http://davidseah.com/syndicated/quickposts to the feedburner feeds through my .htaccess file.


Comments

1. Dave Seah said on 12/31/1969 02:00PM...

I’ll probably set up a separate feed for these. So far I’m liking the idea. Also, they force me to be brief, which is a good thing! :-)

2. Phu said on 02/13/2006 04:15AM...

Just to be pedantic, my name is Phu (i.e. sounds like Foo) not Phy:)

3. Dave Seah said on 02/13/2006 08:56AM...

heh, you’d think I’d be more sensitive to spelling like that :-) corrected!

4. peninah said on 02/13/2006 05:03PM...

:) awesome. I like, except I’m trying to curtail my web surfing by only reading in rss readers.. When I can focus enough I’ll attempt it.

5. peninah said on 02/14/2006 06:30AM...

thanks?! :)

Page 1 of 1 pages

Spam comments, especially search engine optimization linkbacks for products and services, are deleted on sight.

Name:

Email:

Location:

URL (about you):

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:


Next entry: Ten Rules for Startups

Previous entry: Making an Impression

<< Back to main

Thank you for printing this article! Please note that all material on this website is copyrighted by either David Seah or individual comment contributors. To request permission for republication and distribution, please contact David Seah (http://davidseah.com/contact).