Disable WordPress ping backs to your own site

Pingbacks and trackbacks can be lovely. They give you a warm cosy feeling inside. However, linking to yourself is just cheating! Plus it looks a bit weird when you link to your own articles from your own comments.

add_action( 'pre_ping', 'tcb_disable_self_pingback' );
function tcb_disable_self_pingback( &$links ) {
  foreach ( $links as $l => $link ) :
    if ( 0 === strpos( $link, home_url() ) ) :
      unset( $links[$l] );

This is especially useful if you use one of the ‘related content‘ plugins and injects links to related content on your site.

Show future (scheduled) posts

Scheduling posts is a very useful technique, especially for blog authors. Why not add further value to your site by teasing visitors with upcoming posts? Place this code in your page template, and it will show the title of the next five future scheduled posts.

<?php query_posts( 'showposts=5&post_status=future' ); ?>
<?php if ( have_posts() ) : ?>
  <div class="future-posts">Future Posts</div>
  <?php while ( have_posts() ) : the_post(); ?>
      <p class="future-title">
        <?php the_title(); ?> <br />
        <span class="datetime"><?php the_time( 'l, jS F Y' ); ?></span>
  <?php endwhile; ?>
<?php endif; ?>

I don’t use it personally, because I change my mind a lot and change the order of my scheduled posts quite often.

How I built this site (meta blogging)

The purpose of this site has always been more about me learning how to write about technical topics in an engaging fashion. I don’t want to be a journalist or copy writer. However, I do like to be able to express technical things to non-technical people. I would like for everyone to understand their tools in way that is meaningful to them. When someone understands how their tools work, they are better able to use them. To me, there is a level of understanding between knowing how things work, and knowing how to make things.

Making a blogging site

My two main problems are:

  1. I am a slow writer, worrying about all the little things
  2. I love context, and I don’t know when to stop expanding into detail
To overcome these quirks, there are some pretty basic rules or techniques I can apply. These are probably terribly simplistic techniques, and any professional writer of any kind will chuckle at my amateur approach. However, failing is an option!

How to speed up my writing

I chose to try the following things:

  • Jot every idea down, with links and warts in a draft post. Do a brain dump of it.
  • Install a spell checker to stop me being distracted by spelling mistakes and grammar.

How to define my context

This will help stop be babbling, and let me post short snippets of information.
  • Make it all about WordPress. Initially assume I am writing for people who have some prior knowledge about WordPress. Most likely theme development or tinkering.
  • Keep to five categories, and decide what they are, before writing any posts.

Other blog writing techniques

  • Schedule posts. Never post straight away. Initially I thought I would do one a week, but for now I have settled on every four days.

What are the benefits of all this?

Scheduling posts takes the pressure off. If I can log in and see that I have entries in for the next month, then I won’t feel bad about just browsing to see how many hits I’ve had. Dumping my ideas means I can be inspired many times in just a few minutes and get five post ideas note quickly. Once saved as a draft I can re-visit the post and either add detail, or maybe drop it as a bad one.

My five categories are: Rambling, jQuery, Linux, Nginx and WordPress. The last category might be better as PHP, as most of my WordPress work is PHP. However, I didn’t want to exclude HTML and CSS. Having just those categories has helped focus my ideas, and let me not worry about expanding the content to cover other areas. I think singularly that this has been the most useful preparation I made for the site.

I’ve installed jetpack and activated After the Deadline. I don’t actually use it that much, but it has allowed me write what I’m thinking without interrupting myself to fix some spelling. I tend to get fixated on one sentence, making sure it conveys exactly the right message in an unambiguous way that fits into the context of the paragraph and the post as a whole. I know a plugin won’t do that for me, but now I have enough confidence to let a crappy sentence slide until I’ve completed the post.

Additionally I gives me the opportunity to re visit my posts. A month can go by and I can read my post with a fresh pair of eyes.

Am I succeeding?

This is the most enjoyable writing experience I have had all my life. We all have a budding author inside us (apparently), and I seem to be finding mine. And I am learning more about WordPress.

Blogging – what it is? how do I do it?

A quick introduction
I’m a self-confessed web geek. When I was child, I wrote games on the zx spectrum and the vic-20. Mathematics seemed logical and sensible to me, I didn’t struggle with (until I got to university). At 15 I completed a ‘Computing GCSE’. It was mainly scored on a programming task as course work. At university I used JANET and stumbled across x-mosaic – the precursor to Netscape. Looking back it seems inevitable that I become a ‘web developer’ of some sort. Having said all that, I’ve only been blogging for a few months. it is not something that comes naturally to me. So the idea of questioning what blogging, how to blog and even should I blog is a very valid thing to do.

What is blogging?
Originally it was a concatenation of two words: web and logging. Logging your activities on the web. Although this is still true, with the fast-moving nature of the internet, blogging has taken on new meanings. It has responded to the world’s reaction to blogging and become something more. The crucial change is that blogging, unlike a diary or journal, has an audience. At first people blogged for their own sake. But they soon realised that other people read it! And, to be frank, they found other people’s inane ramblings quite boring (well not yours obviously!). Blogging is to write about a part of your life, publishing it on the internet.

Blogging to your audience
My reason for blogging is somewhat cyclical. I want to become better at blogging. I want to be able to write interesting articles about what I do. Publishing on the web has become a powerful tool for businesses, social groups and people in general. This is why social networks are so popular. Professional bloggers are starting to appear. A mix of journalism, copy writing and advertising twirled into something apparently personal. Blogging is to show off, to let other people in on something great, to share and promote your ideas.

How do I blog?
Well, you need a website. There are free hosting options (e.g. wordpress.com). You need something to write about. And, ideally, you need to be able to spell. But, most of all, being an author of a blog is like any other author – like all great orators you need to have the gift of the keyboard. A good blogger has prose and is able to write eloquently and interestingly for their audience.

Why do I blog?
I think the best way to learn is to practice. My technical articles are improving. However, reading back this article I am quite disappointed. It doesn’t flow well, and I don’t feel like it conveys the message I intended. But my aim is to fail and fail often. To not be afraid, and learn from my mistakes.