OriginalEXE
Power Member
- Feb 6, 2012
- 633
- 670
Ok, try these steps:this is my code
Go to theme editor, open functions.php file and add this to the end:
PHP:
function the_slug(){
$blog_url = get_bloginfo('url');
$slug = basename(get_permalink());
do_action('before_slug', $slug);
$slug = apply_filters('slug_filter', $slug);
if( $echo ) echo $slug;
do_action('after_slug', $slug);
echo $blog_url. '/' . $slug;
}
Now replace your code with this one:
PHP:
<?php
function email_members($post_id) {
$linkddd = the_slug();
mail('[email protected]', 'My Subject', $linkddd );
}
add_action('publish_post', 'email_members');
?>
Let me know if it works