Support » Fixing WordPress » Make link clickable

  • I’m using a shortcode that calls this:

    function mm_insert_title_func($atts) {
       // Insert the post title, with optional before and after strings.
       // [mm-insert-title before='<h3>' after='</h3>']
       global $post;
       extract(shortcode_atts(array('before' => '', 'after' => '' ), $atts));
       $output = "{$before}{$post->post_title}{$after}";
    
       return $output;
    }
    add_shortcode('mm-insert-title', 'mm_insert_title_func');

    It grabs the post title so I can insert it into the post automatically. Is there a way to edit that function so that the title it grabs is linked to the post, instead of just the title’s name (without manually having to do this within the post)?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Make link clickable’ is closed to new replies.