Archive for the ‘Wordpress’ Category

Tidy up the RSS

Posted in: Wordpress | Tags: ,

I’ve been playing around with backing up my tweets lately. At this point I’m using the Twitter Tools plugin to create a weekly digest. Since I created a Tumble-blog not to long ago to share social stuff like this I also wanted the tweets to go to tumblr. Part of this was just a way to clean up Tumblr and not create a new post everytime I tweet.

Now, having the tweets on the blog is mostly for me. I didn’t want to bombard people that are subscribed to the RSS feed with this weekly mashup of all my tweets, but still be able to have the RSS feed to send to Tumblr or for anybody that wants it.

This is what I ended up doing:

function tweetRSS123($query) {
	if ($query->is_feed && !is_category()) {
		$query->set('cat','-1');
		}
return $query;
}

add_filter('pre_get_posts','tweetRSS123');

Continue Reading »

Feb
27
2010
No Comments »

Blogroll Links Favicons

Posted in: Wordpress | Tags: ,

Awhile back I wrote that I was having issues with Blogroll Links Favicons plugin for WordPress. I came up with some code that better displayed the favicons and fixed my issue. I wrote the author and he agreed that this code made more sense. I hadn’t thought about it, but recently I checked to see if the updated code had been put into the plugin and it hadn’t.

Just yesterday I emailed John about getting added as a contributor to the plugin, as he’s recently switched his personal site over to Posterous. He agreed to add me and I put my code in right away.

In the future I’m also going to be looking for ways of optimizing the plugin even more than it already is. I have quite a few links on any given page of my site that use this plugin, especially the about page. It’s getting to the point that having to retrieve all these thumbnails slows down my site, so I’m going to look into making this as fast as possible.

Let me know if you’ve got any questions or suggestions.

Jan
23
2010
5 Comments »

WordPress login/out

Posted in: Wordpress | Tags: , ,

Lately I’ve been putting a login link in the footer of my site, but it’s also nice for that to be a logout link when you’re already logged in as well as inserting a link to the site admin section. This line of code does exactly that:

<?php if ( is_user_logged_in() ) { echo "<a href='" . get_option('siteurl') . "/wp-admin/'>Site Admin</a> |"; } ?> <?php wp_loginout(); ?>
Dec
30
2009
No Comments »

Blogroll Links Favicons

Posted in: Wordpress | Tags: ,

I was recently having problems with the Blogroll Links Favicons WordPress plugin. The plugin gets the favicon for all the links that you have displayed on any given page using the WordPress links system. The problem was that the standard way the plugin does this is to add a new anchor link inside the list-item for each link. This was a problem for me because the anchor links were styled, so when I added the plugin everything was messed up.

I thought it would be better if the plugin just set the background image of the anchor link that was already there to the favicon and indented the text of the link. I’ve sent an email to the author of the plugin requesting that he make this the default way to display the favicons, but just incase that doesn’t happen, here’s the code that makes it happen:

Continue Reading »

Dec
30
2009
No Comments »

FancyFlickr

Posted in: Wordpress | Tags: , ,

So when I made this new theme for my website, I knew that I wanted to incorporate flickr photos on site site instead of using the built in WordPress gallery. There is just so much that I love about Flickr, not to mention the photos are much safer there than they are on my webserver.

It was a happy coincidence that Chris Coyier did this video on CSS-Tricks shortly after I finished the theme. I absolutely love how this gallery looked and knew right away that I would model my plugin after it.

I’ve just submitted this to the WordPress plugin directory, so I’ll wait until that gets accepted to put up a download link. If, for some reason, they deny the request, I’ll put up a download link here. If you want to check it out before that, drop me a line and I’ll send it over to you.

Download
Continue Reading »

Nov
20
2009
73 Comments »