[Plugin: Advanced Post List] Using shortcodes in List content section.
-
First of all, I want to publicly thank the developers of this amazing plugin. It’s just awesome for us developers.
That been said,
I have figured out a way to insert shortcodes in the List content section, so you can enhance even more the power of this plugin.Hope this is helpful for you guys.
—
1.- Do the known to get [php_function name=”function_name” param=””] enabled in the APL. Please refer to (kalinbooks site).
2.- Create a function in wp-config.php immediatly after defining the constant “KALINS_ALLOW_PHP” similar to the following:
define("KALINS_ALLOW_PHP", true); function sh_code($post, $shcd){ $shcd=str_replace('#','"',$shcd); //needed to parse " marks if(function_exists('do_shortcode')){ $output=do_shortcode('['.$shcd.']'); }else{ $output="[error: do_shortcode function doesn't exist!]"; } return $output; }
3.- Use the [php_function name=”function_name” param=””] code like this -in the List content section-:
[php_function name="sh_code" param="gallery id=#[ID]# size=#medium# columns=#3#"]
NOTE: Pay special attention to the use of ?[ID]? and ?#? in the example .. ?[ID]? is an APL code that is parsed before the param is.
Well, that’s it. I have successfully proven this so, This WORKS!
Enjoy it!Again, thanks to the authors of this amazing plugin.
Regards,
—
jjyepez
- The topic ‘[Plugin: Advanced Post List] Using shortcodes in List content section.’ is closed to new replies.