I need to modify one of my themes shortcodes so that I can pass a class ID to the columns. This is the shortcode: I need to be able to put in extra parameter id="" and then put in any ID
if (!function_exists('two_col_50_50_col1')) {
function two_col_50_50_col1($atts, $content = null) {
return '<div class="two_columns_50_50 clearfix"><div
class="column1"><div class="column_inner">' . do_shortcode($content) . '</div></div>';
}
}
add_shortcode('two_col_50_50_col1', 'two_col_50_50_col1');
if (!function_exists('two_col_50_50_col2')) {
function two_col_50_50_col2($atts, $content = null) {
return '<div class="column2"><div class="column_inner">' . do_shortcode($content) . '</div></div></div>';
}
}
add_shortcode('two_col_50_50_col2', 'two_col_50_50_col2');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire