Use Native WP Short URL

By default whenever you write a post or page, WordPress stores and assigns an ID number for every single entry made into the database. This ID can be used to retrieve any particular post or page from front end as well. You can easily access certain post or page using following method and it should look something like this.

If you do not have whole bunch of posts on your site, try with little lower number. Something should come up. Now, luckily WordPress permalink structure also allows it's users to keep their permalink structure exactly what I just mentioned. Take a look at the screenshot provided below.

WordPress Permalink Settings PageWordPress Permalink Settings Page.

Even though using such permalink structure would make it lot easier to share your posts or pages, it is not recommended for SEO point of view. So, if you don't want to use the "plain" permalink settings for your site yet still want to be able to share your post using short URL (more like or services), this is what you should do.

<?php echo get_bloginfo('url').'/?p='.$post->ID; ?>

Copy and paste this little snippet on your "single.php" page(within a <div> or <span> tag) and style it with css. You are good to go.


Commenting is disabled.