Create a send this to twitter button for wordpress

November 7, 2008

Let’s create a button to allow your visitors to send the current post they’re reading to twitter. Simply paste the following code on your single.php file, within the loop: <a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>" title="Click to send this page to Twitter!" target="_blank">Share on Twitter</a> Your readers are now able to send your post url to twitter! Hope it will bring you some traffic and new readers.  Read More →

Add a Print button to your wordpress posts

November 5, 2008

To include your print stylesheet, add the following line to your header.php file, within the <head> and </head> tags. <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/print.css" media="print" /> Now we have to create our “Print this” button. Open your single.php file and add the following line: <a href="javascript:window.print()">Print this Article</a> Your visitors are now able to print your posts easily with a nice print styling.  Read More →

Add del and spam buttons to your wordpress comments

November 5, 2008

Wouldn’t it be nice if you were able to mark a comment as spam, or even delete it, from your blog, without visiting your WordPress dashboard? If you’re interested, read on, you’ll probably not regret it. First, we have to create the function. Paste the code below on the functions.php file from your theme. If that file doesn’t exists, create it.   function delete_comment_link($id) { if (current_user_can('edit_post')) { echo '| <a href="'.admin_url("comment.php?action=cdc&c=$id").'">del</a>... [Read the full story]

Create a dynamic sidebar for wordpress

November 5, 2008

Do you ever wanted to be able to load different sidebars according to the current category? Since WordPress 2.5, you can specify a sidebar name to be inclued: <?php get_sidebar('name'); ?> The above code will include the file named sidebar-name.php. The following code will include a custom sidebar according to the category you are on: <?php //to be able to use this outside the loop if ( have_posts() ) { the_post(); rewind_posts(); } if ( in_category('1') ) { get_sidebar('cat1'); //gets... [Read the full story]

Display your latest twitter entry on your wordpress

November 4, 2008

Many bloggers uses twitter, which is a very great way to socialize with other bloggers and promote your posts. Displaying your latest twitter entry on your blog is a good idea to help your readers staying tuned with you. To display your latest twitter entry, just paste the code below anywhere on your blog.     <?php // Your twitter username. $username = "TwitterUsername"; // Prefix - some text you want displayed before your latest tweet. // (HTML is OK, but be sure to escape quotes with backslashes: for example... [Read the full story]

Page 9 of 10« First...«678910»