Phil Buchanan on "[Plugin: Accordion Shortcodes] adding accordion.js to page template"

ساخت وبلاگ

dylanminter
Member
Posted 2 days ago #

I have a very basic page template that does not call the regular page footer. What code can I add to this template so the .js will load?

Thanks!

https://wordpress.org/plugins/accordion-shortcodes/

This is complete untested (and officially unsupported) but you'll have to add a link to the plugin script wp-content/plugins/accordion-shortcodes/accordion.min.js. You'll also have to manually add the accordion options to a script tag immediately before the accordion.min.js script. Any settings set on the opening shortcode will be ignored. Here is what the defaults look like:

var accordionShortcodesSettings = [ { 'id': 'accordion-1', 'autoClose': true, 'openFirst': false, 'openAll': false, 'clickToClose': false, 'scroll': false }
];

Also note that if you add multiple accordions to a single page you'll need to add one JavaScript object to the accordionShortcodesSettings array for each.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 86 تاريخ : دوشنبه 13 ارديبهشت 1395 ساعت: 9:21