| name | language | licence |
|---|---|---|
| TINYURL ON EVERY WORDPRESS-POST | PHP | BSD |
| Display an External RSS Feed | PHP | BSD |
| Multiple backgrounds with CSS3 | CSS | BSD |
| Create A Maintenance Page For Your WordPress Blog | HTML | BSD |
| Display Related Posts Without A Plug-In | PHP | BSD |
| Resize Images On The Fly | PHP | BSD |
| opacity background | PHP | BSD |
| Untitled Snippet | PHP | BSD |
< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 >
language: PHP
licence: BSD
TINYURL ON EVERY WORDPRESS-POST
options: view full snippet • send to code collector
//Just go to design > theme editor > functions.php and add this function
function getTinyUrl($url) {
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
return $tinyurl;
}
//In the theme editor > single.php you can add this line where ever you want to show the link to the tidyURL.
<?php
$turl = getTinyUrl(get_permalink($post->ID));
echo ‘Tiny URL: <a href="’.$turl.‘">’.$turl.‘</a>’;
?>



library
buttons (3)
wp (93)