php - Wordpress, is it possible to add custom parameters to shortcode any widget -


i'm using shortcode widget plugin. possible send attributes widget called shortocde. this

[do_widget name="category viewer" maxcount=5] 

where maxcount parameter should used in category viewer widget.

you can check attributes "shortcode widget" shortcode uses looking @ following code plugin:

extract(shortcode_atts(array(         'sidebar' => 'widgets shortcodes',         'id' => '',         'name' => '', /* mkm added explicit 'name' attribute.  existing users still need allow prev method, else many support queries happen */         'title' => '',   /* default title unless ask not - use string here not boolean */         'class' => 'amr_widget', /* widget class picked automatically.  if want add additional class @ wrap level try match theme, use */         'wrap' => '' /* wrap whole thing - title plus widget in div - maybe themes use div, maybe not, maybe want styling, maybe not */     ), $atts)); 

so - maxcount attribute won't extracted shortcode "shortcode widget".

you have modify plugin code above support attribute adding maxcount index array...

check out codex more info on how work shortcode attributes


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -