Written by
David Artiss. Published 11 months, 2 weeks ago. In categories
News,
Web Development,
Wordpress.
My very popular Simple Social Bookmarks plugin has been updated!
Changes include…
- Corrected ampersand in AddToAny URL to ensure code is XHTML valid
- If no short URL is specified the WordPress shortlink will be used
- Ability to specify own titles as well as URL
- Added a shortcode option
Full details, as well as download options are on the plugin page.


Written by
David Artiss. Published 11 months, 2 weeks ago. Last modified 2 weeks, 4 days ago. In categories
Wordpress.
Many WordPress functions have a standard version which outputs the results directly and an additional version prefixed with get_ that returns the output – useful for adding to a string and manipulating before output.
One such exclusion is the_shortlink, which returns a short link to any page or post – there is no get_the_shortlink, so many people have to resort to just outputting the result in a FORM field for people to cut & paste. However, here is a quick way to add the capability to your blog – simply add the following 5 lines to your theme’s function.php file…
function get_the_shortlink() {
$post_id = get_the_ID();
if ($post_id!="") {$shortlink=home_url()."/?p=".$post_id;} else {$shortlink="";}
return $shortlink;
}Or, in one line…
function get_the_shortlink() {if (get_the_ID()!="") {return home_url()."/?p=".get_the_ID();} else {return;}}Now you just need to call get_the_shortlink() from within your WordPress loop and it will return the shortlink URL.
Unlike the_shortlink it doesn’t accept any parameters, but this is a quick and simple solution.


Written by
David Artiss. Published 11 months, 3 weeks ago. In categories
News,
Web Development,
Wordpress.
WP README Parser version 1.1 has been released with the following changes…
- Improved code display – particularly code multi-lines
- Fixed a file fetching bug
- Added a new option to suppress specific lines of output
Full details, including a download link, are available on the plugin page.

