Herself's Webtools

Scripts, HowTos, Templates, Plugins, Widgets, Tips

Archive for the ‘how to’ Category

How to add ‘Twitter This’ links to your WordPress Posts

without comments

Twitter seems to be the preferred social network now so I decided I needed some ‘Twitter This’ links on my WordPress Blogs.

You’ll want to add this link to both the index.php and the single.php pages in your theme. Every theme is different so I can’t tell you exactly where to add it. I find the comments section in those pages and work my way up to where the date, tags or other miscellany is stored and added them there on my themes.

The link you’ll want is:
<p><a href=”http://twitter.com/home?status=Reading:<?php echo urlencode(get_permalink(get_the_ID())); ?>&title=<?php echo urlencode(get_the_title(get_the_ID())); ?>”>Twitter this</a></p>

You might also check out James Wilkes Design version of the link He is pickier than I about the encoding.

Many thanks to:
Jamie Huskisson and to James Wilkes Design who gave me the pieces I needed to put the link together correctly.

Written by Linda MacPhee-Cobb

March 21st, 2010 at 9:18 am

Magazine style automatically updated WordPress blogs

without comments

I’ve been wanting a magazine style template for my main website splash page for about six months. And I’d been wondering how those scrapers, scraped you rss feed into their blog. Sometimes procrastination is a good thing when I finally got around to looking into it all I found most of the pieces had already been written.

blog-splash

Herself’s Green Things picks up the rss feeds from all my websites, turns them into blog posts and posts them in a magazine style theme all automatically.

I tried all the magazine themes I could find on the WordPress theme pages. The Magadine theme was the one that was most stable and easiest to hack so that’s the one I choose. Colors and fonts are very easy to change as are the number of columns and rows. ( change rows and columns in index.php )

<?php
if($count == 2 ) {
echo “<div style=’clear:both;’></div>”;
$count = 0;
}else{
$count += 1;
}
?>

count == 2 will give you 3 columns, count == 1 will give you two, count == 3 gives you four columns.

There are several WP plugins that will turn rss feeds into posts.  I chose Syndication which appears to have been pulled by the author because he/she didn’t want spammers using it.  That’s a shame, maybe if you ask nicely the coder will give you a copy, I’ll respect the coder’s wishes and not provide copies.  I like it best because it turns the title of the post into a link back to the original blog.

There are about a half dozen other choices available on the WordPress plugins site.  Try them all see what suits you best. I thought WP-o-Matic and FeedWordPress also did excellent jobs.

After activating your syndication plugin you tell it which feeds to pull and all the ones I looked at gave you several options for credit, links how much of the feed entry to post ect.

Now you shouldn’t have to be told you should only be pulling your own content as I’m doing, or content from other blogs where you have permission.  It can be a great way to consolidate your blogs or promote other’s blogs.

You should also only use partial feeds to keep the search engine gods happy, and clicking on the title of the post should take your viewer to the original entry not wandering around the consolidated site.

One problem I had is that I couldn’t fetch 4 of my 13 feeds. I have no idea what or why so what I did was great a Yahoo Pipe of all my blog feeds, then have the syndication plugin grab that feed.

Written by Linda MacPhee-Cobb

January 15th, 2009 at 5:00 am