How to add an end mark to your articles on WordPress

END-MARKS ARE A typographical feature, most probably derived from the technology and computer-science industry, that employs a use of a symbol, text or icon to signal the end of a piece of text to the reader.

Personally, I am a great fan of end-marks, and I was using them in my first blog at WordPress.com but things changed later and, (unless I manually inserted them every time,) I had no way of fitting one into my articles… until now!

[hr_padding] [hr_padding]

As magazine features

If you have ever seen an end-mark before, it is probably in a magazine, at the end of every article (see picture below for examples.) Apart from being typographically good looking, these things serve to signal a more finished end to an article, much like a full stop does to a sentence. Once I managed to write a handful of code, I began employing end-marks on this website as my regular readers would probably have noticed.

Endmark examples

As I said already, manually inserting end-marks after every article is a tedious job; but, on the other hand, it cannot always be fully automated either. For instance, Colin Temple has a great endmark plugin that appends an end-mark of your choice to your articles.

[hr_top] [hr_padding]

Endmark plugin

However, as I found out myself, if you have meddled with some of the code previously (or even if you have not, in some cases,) such as including certain sharing options after your blog post etc., the sharing buttons come wrapped into the main content division (they even do so native-ly on some themes) and you end up with an endmark after the sharing options, which can turn out to be awkward.

Colin’s plugin has some other features that need working, as he says on the website himself, but — if you care enough about your blog to remember adding an end-mark — I have a quick and foolproof solution for you with one of WordPress’ best introductions: shortcodes.

I have not come up with a method to fully automate it for the same reasons stated earlier, but if a code as simple as [x] is too hard to type in, then this exercise is not for you!

[hr_top] [hr_padding]

What is a shortcode?

Ever since WordPress introduced shortcodes, the platform — and well neigh the blogosphere itself — has begun a sort of new era in that clients can do quite a bit of flexible work themselves now.

Basically, a shortcode is a small piece of text that signals the browser to do something a programmer has pre-programmed into your website. For instance, if I pre-programme a code into your website to print a red block every time you type in [red] then the code [red] is called a shortcode and you can use it without really knowing the original code that tells the browser to display the red block. (And you don’t have to call me up to find out how to do it either!)

In my solution, I decided to create a shortcode to my liking, and that is what I will show you now in as much step-by-step detail as possible.

[hr_top] [hr_padding]

 Step #1:  Creating a shortcode

We will start by writing a small piece of code that does some simple things:

[hr_padding]
  • It tells the browser to start executing the end-mark function
  • It tells the browser what the end-mark is, and
  • It tells the browser how to recognise your request to display the end-mark

I have already written the most basic structure of that code for you, so all you have to do is copy it and hold on to it for now. (Hover over the code and click the second icon that appears to copy it.)

[php]

<!–?<span class="hiddenSpellError" pre=""–>php
function UniqueFunctionName() {
return ‘<p>fin</p>';
}
add_shortcode(‘end’, ‘UniqueFunctionName’);
?>

[/php]

If you’d like, you can paste it onto a text editor like Notepad and edit certain areas. First of all, change the  UniqueFunctionName , in the two places that it appears, to a name of your choice. You can call it anything you like, but avoid spaces and use under_scores instead.

Next change the text that says  end  to whatever you want the shortcode to be. In this case, calling [end] will get the browser to load your end-mark. You can change it to anything you like; for instance, I keep mine as [ vhb ] so I can sign off with it each time I finish an article and have the end-mark displayed. While making changes at these places, be careful not to alter inverted commas and other punctuation.

Once you are done with the changes, copy the altered code to your clipboard (i.e. Ctrl+C on your PC, or Cmd+C on your Mac.)

[hr_top] [hr_padding]

 Step #2:  Adding the code to your theme and calling it

Our next step is to add this code to our theme. There are several ways to do this, but if you are not too good with code, it is better to make as little change as possible to the original files, so below is the method I suggest.

[hr_padding] [notice type="blue"] The best way to edit a theme is to leave the original files alone and create a child theme instead, but I will not explain that here since it is a huge topic on it own!
[/notice]

First go to your core files (your control panel/ftp area where your website files are stored) and create a new file; call it something like endmark.php. Of course, you can call it whatever you want, but this is the name I will be using in this tutorial.

Paste the code you copied (or the one you altered) in step #1 to the endmark.php file and save it.

Now we are going to make sure the lines of code that load your website onto a browser remember to call the new endmark.php file, else your shortcode will not work. Again, there are several ways to do this — including conditionally — but, since this code is light-weight and will hardly delay the page load time, we can afford to do it in a simple, straightforward manner.

Open your theme functions file (named functions.php) or a child-theme you have created and add the line of code that I have written below to it. If you do not know where exactly to add it, just make sure you put it before the  ?>  symbols at the very end.

[php]include(‘shortcodes.php’);[/php]

Now, onto the next step!

[hr_top] [hr_padding]

 Step #3:  Designing the end mark

By now I take it you have decided what your end-mark will be. Most prefer to use a small square block or an ancient, intricate glyph. I, for one, use my wordmark (see the end of this article.) If you have not, you have one more step before you start using the end mark, so start thinking!

In this step, we will make sure our end mark is displayed where we want it to. To start, open the endmark.php file.

If you have not made any alterations (except the ones stated in step #1) then, in the line 3, you should find this:  <p>fin</p> .

Alongside this I also suggest you open a new post editor on your WordPress dashboard, type in your endmark shortcode (in this case, [end]) and use the preview button to see how it is working out. The chances are you see the word fin at the end of the article, but it is on a new line. The reason for this is that html does not support multiple <p> tags on the same line. (One <p> tag is already being used by your body, and using a second one moves it to a new line — after all it is the paragraph tag!)

Now there are two things you might want to do here. You can either use this and, perhaps, center the end-mark on its own line; or you can push the end-mark to the same line as the last line of the article, like you see on this website.

Let us examine the first case: you can, of course, simply edit the  <p>’fin'</p>  tags in the endmark.php file to  

‘fin’

 , however, the align attribute of the paragraph tag is unsupported after HTML4.0 — in other words, you may not be able to do this successfully.

So our next solution is to use CSS, which does work. Simply change the line to something like  <p style=”text-align:center”>fin</p>  where the center attribute may be used as left also, to left-align the endmark.

The second case is if you do not want the end mark in a line of its own: edit line 3 to put the paragraph tags inside span tags like  <span><p>fin</p></span> . Preview your post now and, voila, you see the end mark in the same line as the last line of the paragraph.

[hr_padding] [notice type="blue"] You might notice how I have a little space between the last full stop and the end mark on this website, but you cannot see so much space in your preview before the fin end mark we have added.

The trick is to use an HTML code called the non-breaking space (i.e. white space that the browser does not collapse.) You can do this by typing in  &nbsp;  where you need a space. Do it several times to leave lots of space.
[/notice] [hr_top] [hr_padding]

 Step #4:  Making the end-mark yours!

Who wants a lousy fin as their end mark? In this final step, we will make the end mark truly yours!

You have probably decided on what you want the end mark to be be now. Perhaps a square, or a circle, or a half-circle or a weird scribble, or an elvish initial, or maybe even your own signature like I used to use before. The simplest way to use this is to create an image; keep it within 10 – 14px in height, depending on your text, and making it square is always your best bet.

Upload the image somewhere — I strongly urge you to use your own website — and copy the image location. We will call this  http://mysite.com/location/of/my/image.jpg . JPG files are slimmest, and therefore the fastest to load, but you can use any common format you like.

All you have to do is replace the word  fin  in your endmark.php file with  <img src=”http://mysite.com/location/of/my/image.jpg”> . Replace our fake image location with yours and there you have it: your own unique end mark!

If you have any questions, feel free to ask me with a comment here or simply by dropping me an email, and I will help you as best as I can. Have fun with your new end mark. [vhb]

On Why I Write Flash Fiction

Why not read some of my works?

“Eschew the monumental. Shun the Epic. All the guys who can paint great big pictures can paint great small ones.”

— Ernest Hemmingway

People often ask me why I write Flash Fiction. Surprisingly, some of my readers fail to understand most such works. At first I thought this was just my stories, but on further inquiry I found that they never understood the works of most other Flash Fiction writers out there. Most people found it too high a standard, too subtle an art form or too complicated because, and I quote, ‘there is so much contained in such few words.’

Now let me return to the question I had been posed: why do I write flash fiction? The simplest answer would be, ‘because I like it.’ But that would hardly satisfy the more curious lot, so let me elaborate.

As Hemmingway said, ‘All the guys who can paint great big pictures can paint great small ones.’ That is most true. One can always sit and type an entire novella or short story in no time. But the task they could be given next would seem herculean: to compress that, cut the unnecessary parts and make it a mere 500 words in length.

What is Flash Fiction?

Flash Fiction is an art of writing which—at its greatest extent, reaches 500 words. There are numerous genres under this style of writing fondly called 69ers and such. There are an ardent group of people who refuse to cross 50 words in length; 69ers have exactly 69 words and some are lenient up to 100. However, the broadly accepted upper limit is 500.

I like to stick to the upper limit because most of my works go quite near that. There are two reasons I do this: firstly, 50 and 69ers are way too short in my opinion, for the common man to fully understand the implications. But do not mistake me, they are wonderful nonetheless, once you catch on to this entire concept of Flash Fiction. And, secondly, all my works focus of building up a cliffhanger that is high enough above the ground to be actually exciting. I do this by taking full advantage of the 500 word limit, not in explaining the scene but in putting more action into composing the existing story.

Not Everybody can Write Flash Fiction

We Flash Fiction writers are an eccentric minority as far as I have seen, and mainly because of two reasons (which I still believe boils down to the same thing) one, not everybody fully understands the implications of a work of flash fiction; and, two, not everybody can ably write with brevity while still being effective. (There is a reason why they call it an art.)

A parenthetical question I often receive is where I (and I am sure they refer to all Flash Fiction writers) get these stories from. While we do not get these stories from anywhere, it is not hard to see what the question really is: how do we come up with so many ideas to write.

The secret (although I can hardly call it that) happens to be that we look around and take in everything, at every moment. In short, remember that there is a story in every moment, in every act, in daily life. It can be as simple as a man waiting on the street for a bus. It can be about how he takes an annoying call only to find it was a wrong number and that he missed the bus in the process. This was just off my fingers so you might be able to come up with something else for it. Perhaps a thriller instead of a comedy? Either way, remember that our only inspiration stemmed from that man at the bus stop.

Implications of my writing

Now we come to areas more centric to my work. I wish to take a moment to make it clear as to how my own Flash Fiction ought to/can be viewed. While this may differ from author to author (and is why I am not generalising it) it may even differ between stories of the same author.

Let us consider the example of one of my newest stories. It is titled The Second One and it is, naturally, suggested that you read it before going ahead. It is flash fiction after all and hardly takes five minutes to read through! You might want to ponder over it for a while before going through my explanation below.

Having read the story, a few thoughts would surely have flashed in your mind. I will take into account three of these possible thoughts for my explanation.

First of all, there is the obvious question as to who is shot. This is left entirely to you as the reader. I love to leave out the very last bits to my reader’s grey matter. Fire it up and come up with explanations. After all, whatever plausible reason you give has just as much validity as another.

This is what I meant when I say (as I often do) that I prefer to leave my flash fiction open-ended. There is the story, there are the facts, but you decide how things turn out. And all I take are a few hundred words to set the scene for you. I write my stories roughly once a week so you can fuel your imagination anew with every passing day!

Alright, onto the next issue: why is it titled The Second One? In other words, what so I mean (or refer to) when I say the second one?

Is it the second bullet? Perhaps it is the second of the two assassins? Perhaps it is something else entirely? Again, this makes the work open-ended. Luckily for me, I could achieve this in this particular story; it may not happen all the time. Many of my earlier stories do not have such open-ended titles. At times, in fact, it pays to have factual ones.

The point is simple: such titles attract and remain with people while keeping with the spirit of flash fiction writing — to make your imagination wander.

Lastly, a slightly more subtle aspect in this story is the sequence I shift the POV in. Why do I begin with the night watch when I could have started with the assassins on the driveway? This is for effect, which, if handled carefully so as not to be a strain on the word count, can help flash fiction beyond imagination.

To expand on this, look at it this way: had I begun the story with the assassins, the watch at the end would have just seemed out of place. And if I had to avoid this, my narration would have to end in the same room of the murder, giving no leeway for a little creative presentation that allows you to think. What is the point if you read the story and not participate in it?

The last one, needless to say, is story-centric and merely for effect &c. especially when (an only if) you have words to spare.

For those who ever wondered why I write Flash Fiction, perhaps this cleared it?

Do read all my stories on my Flash Fiction website and circle me on Google+ to interact more directly and, I daresay, swiftly!

Title trouble: Do your articles need catchy titles or descriptive ones?

Having written articles for offline media and perhaps even more often for those online–my blog and my website being two major carriers of my writings–I have observed one question that quite haunts writers. What should the most important element in the title of an article be?

There are two possibilities here and writers often contemplate heavily between the two: catchy titles and descriptive titles. Which should one choose? In my opinion, this decision depends on various factors. 

WHAT KIND OF ARTICLE IS IT?

The very first determining factor is, perhaps, the kind of article we are dealing with. Suppose the article is a work of satire, there is hardly any need to have a catchy title. Our title in such a case, while being descriptive, also needs to have a hint of wit and satire in it.

This is because such articles, while being fewer in number, require the reader to expect satire and not a serious examination of the issue in question. Works of satire no doubt also deliver an end result but it not quite in the same manner as do more serious, descriptive ones.

Articles of report and of reproduction of events ought to have titles that describe, if not the event itself, at least the scope of the event. And, perhaps as an alternative, we can also give them titles that highlight the concept or perspective from which we plan to examine the issue at hand in the article.

If the article happens to be a work of a much lighter order. Articles that, say, merely aim to entertain the reader and occasionally make him ponder (though not too seriously) then we will definitely be better off with a catchy title.

Another instance wherein such a title may be better preferred to a descriptive one is in articles of fiction and fantasy. These articles ought to hold suspense in mind and not speak of the suspense and the pivotal aspect around which the story revolves, lest it risk giving away a little too much. The aim, therefore, in such titles is to make the reader want to find out and ask himself, what might be that work which so lies behind this strange title?

IS IT ONLINE OR OFFLINE?

I have often observed, over the past few years of my writing, that articles being published offline happen to have requirements of the kind very subtly different from articles meant solely for publication online.

By this I mean articles of a very general character, those fit for reading in books or magazines and those which are not merely a matter of passing interest; those we find in books to discard, in newspapers and more than occasionally in archived pages of weblogs and static webpages.

These articles need to have titles that can be catchy and only slightly hint at their subject for the subject, it is needless to say, is already quite a buzzword.

The major difference in articles online and offline is the means by which they aim at driving readers towards them.

In case of an offline article, readers man arrive at them in one of two ways: recommendation or by chance.

If they arrive at it by recommendation, we can safely assume than the article will be read, regardless of the title. But, how came this recommendation? Surely, the recommender must have either stumbled upon it by chance or must have been recommended it. And following it thus, we come to the conclusion that, no matter how many levels of recommenders there exist, at some point, the reader of the article (assuming, of course, that the author himself did not recommend it) must have come across it by chance.

Now let us examine articles in media online. The ways in which a reader may come across this, thought much vast comparatively, can be broadly categorised into three: recommendations, purpose search and chance.

Recommendations are quite like we have seen in their offline counterparts: the link is provided and the article is read. Here, too, we have no problem with the kind of title we need.

However, in the next two methods, our title will play a pivotal role. By purpose search I mean the searches that may be performed on various search engines and through search boxes in various websites. And by chance I refer to the process of reading the title somewhere, say in some other website listed under the title ofsimilar articles, or, perhaps over time, under the title of people who read this also read… and so on.

It is quite obvious in either case that the now famous term SEO (Search Engine Optimisation) plays an important role.

SEARCH FRIENDLY TITLES

It is then important for us to first understand, quite broadly, how a search engine works.

A search engine is based on terms called tags. These can be assumed to be the backbone of the engine. These tags come from various sources, most commonly authors of articles and owners of websites.

For every article one writes, one provides tags, which are simply words or short phrases that represent the article. The idea is that is a person looking for those terms is led to the article, it must be worth their while.

Search engines therefore measure the closeness (or relevance) of an article by seeing how many (or what part of) the searched terms are also resent as tags in your article. The more the better, and the higher your position on the result page (called ranking.)

Now an important factor, one perhaps less known, is that this can, at times, bring up a sort of tie between two or more results. In such a case these search engines (being mere programmes that cannot think for themselves and therefore judge that your article is better than someone else’s) resort to ranking the articles based on the number of search termspresent in the title.

CATCH, YET DESCRIPTIVE TITLES?

This clearly means that a descriptive title helps much more in such a scenario and indeed in any online publishing that needs readers, at large.

While catchy titles do attract more readers, catchy titles with hardly any hint at the topic being explored are quite useless. And of what use is a catchy title when all it does is drown your article in the hundreds of search result pages?

The verdict, therefore is that, while catchy titles and descriptive ones both have their pros and cons, the scale tips very slightly towards descriptive ones.

The best then is to blend them much like holistic and reductionistic approaches are blended in physics. It is best, quite unarguably, to have a catchy title that also, even if very subtly, describes the subject under examination and–to inject a technicality–also includes at least one key word/tag in it.

So go ahead now and start re-framing your titles. Or perhaps you have your own vies regarding this crucial topic? Share it below.

Title Trouble: do your articles need catchy titles or descriptive ones?

Having written articles for offline media and perhaps even more often for those online–my blog and my website being two major carriers of my writings–I have observed one question that quite haunts writers. What should the most important element in the title of an article be?

There are two possibilities here and writers often contemplate heavily between the two: catchy titles and descriptive titles. Which should one choose? In my opinion, this decision depends on various factors. Continue reading

The writing habit

In all the years that I have been writing, I have seen many achievements including getting a novel finished up to the very last chapter and then starting a new one, writing a short quick drama for kids (the topic is of everybody’s age, and I was actually commissioned to write it,) and writing a number of well-received short stories and to top it all, being nominated for an internationally recognised award in english writing after a tense ten day camp and having discussions with prominent authors in Delhi, India. And all this led me to formulate five very important points that I believe any writer should incorporate. Perhaps some have already done it, perhaps some have not and perhaps there are some like me who preach them all but practice little. And as I explain to you those four points, I shall learn alongside you and adopt them. There will be change, gradually; you will see it. Continue reading