Getting the count of a shortcode that is nested

Here is very, very rough code that should get you started: add_shortcode(‘outer_shortcode’,function($attts,$content){return 1;}); add_shortcode(‘inner_code’,function($attts,$content){return 1;}); $str=”[outer_shortcode][inner_code url=”#” title=”Hello”][inner_code url=”#2″ title=”Hello2″][/outer_shortcode]”; $reg = get_shortcode_regex(); preg_match_all(‘~’.$reg.’~’,$str,$matches); var_dump($matches); preg_match_all(‘~’.$reg.’~’,$matches[5][0],$matches2); var_dump($matches2); What is happening is that you are parsing the string which matches and “pulls apart” the outer shortcode. You then need to parse that shortcode’s content (array element … Read more

How to get the $atts of a shortcode

Straight from the Shortcode API page on the Codex: The raw $atts array may include any arbitrary attributes that are specified by the user. That is to say, the $atts parameter passed to your shortcode callback function contains all the attributes in an associative array.

WordPress Short code with additional parameter

First of all: Please read this: http://codex.wordpress.org/Shortcode_API Everything you need to know about shortcode parameters is in there. Second: If you want to split content automatically into two or more columns, why don’t you use css? http://www.w3schools.com/css/css3_multiple_columns.asp works pretty good. Happy Coding, Kuchenundkakao

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)