I need to display the first line of text that will be between [shortcode]
and that this line is a link to your source page.
The code below works, it displays a div, but I want to display the first line of the text that I put [shortcode]
between [/shortcode]
.
To explain the utility:
I'm using wordpress and I need to write small news / posts in posts, where the first line of each news will go to certain fields within resumes (which are also posts).
I have not found any plugins that can do this with this simplicity.
<?php
add_shortcode('noticiaclaudio', 'func_news');
function func_news($atts, $content='') {
extract(shortcode_atts(array(
'height' => '15px',
'width' => '60%',
'padding' => '3px',
'font-color' => '#999999',
'font-size' => '12px',
), $atts));
return '<div style="height:'.$height.';width:'.$width.';padding:'.$padding.';">' . do_shortcode($content) . '</div>';
}