Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
2 added 73 characters in body
source | link

I used to use shortcode with get_bloginfo for relative paths inside actual post content. I was going to turn it into a full blow plugin but I could have sworn the folks at automatic released one which I can no longer find. Here's is a simple example of how it work as I can't find mine atm since I don't use it anymore, as per Bainternet post, maybe the folks at automatic realized this too..

A simple shortcode function that will return your base url:

function my_relative_post_image_link() {
$linky = get_bloginfo('wpurl');
echo $linky;
}
add_shortcode('posty', 'my_relative_post_image_link');

If your site is example.com then putting the shortcode [posty] in your content will return example.com as text.

To make actual use of this you will need to customize the function using more parameters from get_blogfino and wrap it in the necessary html tags http://codex.wordpress.org/Function_Reference/get_bloginfo

I used to use shortcode with get_bloginfo for relative paths inside actual post content. I was going to turn it into a full blow plugin but I could have sworn the folks at automatic released one which I can no longer find. Here's is a simple example of how it work as I can't find mine atm since I don't use it anymore.

A simple shortcode function that will return your base url:

function my_relative_post_image_link() {
$linky = get_bloginfo('wpurl');
echo $linky;
}
add_shortcode('posty', 'my_relative_post_image_link');

If your site is example.com then putting the shortcode [posty] in your content will return example.com as text.

To make actual use of this you will need to customize the function using more parameters from get_blogfino and wrap it in the necessary html tags http://codex.wordpress.org/Function_Reference/get_bloginfo

I used to use shortcode with get_bloginfo for relative paths inside actual post content. I was going to turn it into a full blow plugin but I could have sworn the folks at automatic released one which I can no longer find. Here's is a simple example of how it work as I can't find mine atm since I don't use it anymore, as per Bainternet post, maybe the folks at automatic realized this too..

A simple shortcode function that will return your base url:

function my_relative_post_image_link() {
$linky = get_bloginfo('wpurl');
echo $linky;
}
add_shortcode('posty', 'my_relative_post_image_link');

If your site is example.com then putting the shortcode [posty] in your content will return example.com as text.

To make actual use of this you will need to customize the function using more parameters from get_blogfino and wrap it in the necessary html tags http://codex.wordpress.org/Function_Reference/get_bloginfo

1
source | link

I used to use shortcode with get_bloginfo for relative paths inside actual post content. I was going to turn it into a full blow plugin but I could have sworn the folks at automatic released one which I can no longer find. Here's is a simple example of how it work as I can't find mine atm since I don't use it anymore.

A simple shortcode function that will return your base url:

function my_relative_post_image_link() {
$linky = get_bloginfo('wpurl');
echo $linky;
}
add_shortcode('posty', 'my_relative_post_image_link');

If your site is example.com then putting the shortcode [posty] in your content will return example.com as text.

To make actual use of this you will need to customize the function using more parameters from get_blogfino and wrap it in the necessary html tags http://codex.wordpress.org/Function_Reference/get_bloginfo