• Hello,

    My php knowledge is very limited and I cannot make this work… So I have the following in my functions.php:

    function preview( $atts, $content = null ) {
    	return '<div><span></span>'.do_shortcode($content).'</div>';
    }
    add_shortcode("preview", "preview");

    My question: how can I call the_title inside that span tag? Is it possible?

    I thought it would be easy but my experiments return only several degrees of website destruction.

    Thank you very much!

  • The topic ‘call the_title inside a shortcode’ is closed to new replies.