Archive

Archive for the ‘wordpress’ Category

WordPress sticky notes!

September 14, 2008 Leave a comment

WordPress recently introduced the wordpress sticky notes. We had always seen sticky notes in case of forums where some discussions were pinned at the top but was never seen in any other environment.

Many a times its only the first post in the blog that is read or mebbe the posts on the first page. But sometimes you just want to convey some stuff always/for a given period of time. Sticky notes will serve you this./

Enjoy..

Categories: wordpress Tags: ,

WordPress “previous | next post” links!

June 29, 2008 Leave a comment

Hello world! – My first post will be on how to put previous and next post link on the individual post. Why? Obviously, in a normally installed wordpress copy when you comment on a post or click on a post, you reach a place from where you don’t know how to act. To the wordpress bloggers – Many of your viewers have a tendency of closing the tab and running away from your blog. Why scare them away ! Instead link your individual post page with the previous and next posts 🙂

Here is how to do it –
Add these lines of code in the index.php file after the following line (wordpress 2.5.1)-
while (have_posts()) : the_post();

<?php if ($single) { ?>
<div class="navigation"><?php previous_post_link('« « % |', '', 'yes');?> <a href="/"> Home </a> <?php next_post_link('| % » » ', '', 'yes');?></div>
<?php } ?>


More documentation help if required for more cleanliness and flexibility can be found here – http://codex.wordpress.org/Template_Tags/previous_post_link

PS: writing a “code” in wordpress is a real big job. By default, WordPress will convert unrecognized uses of < and > into characters which actually look like < and >, which will “look” like a when posted. Or, if it finds the use of an HTML tag within the post, it will use the tag like it is HTML and you will have funky looking text and a messed up layout.

PS2: Use of previous_post is deprecated and previous_post_link should be used instead.

Categories: wordpress Tags: , , ,
%d bloggers like this: