Here is the code
First step create shortcode function
Create parameter
Usage
First step create shortcode function
function portfolio() {
return get_home_url();
}
add_shortcode('portfolio', 'portfolio');
Create parameter
function portfolio($atts) {
$attributes = shortcode_atts( array(
'perpage' => -1
), $atts );
return $attributes ['perpage'];
}
add_shortcode('portfolio', 'portfolio');
[portfolio perpage='10']