Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Can I pass attributes from a shortcode to a nested one.

Example:

[row $number_of_cols=4]
    [col]
        $width=total_width/$number_of_cols;
    [/col]
[/row]
share|improve this question
    
Please explain the example and add the relevant PHP code. Did you research this topic or search this site? –  birgire Jan 20 at 16:04
    
yes i searched but found nothing...I want to type the param in the shortcode and use it in a nested shortcode like write the number of columns to be used and divide the total width on that number to get the width of each column...NB: columns have also their own param –  ws-templates Jan 20 at 16:08
    
I see many similar questions in the "Related" list on the right sidebar, give some of them a try and report back if you get stuck. –  birgire Jan 20 at 16:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.