themeum / qubely

Qubely Blocks – Full-fledged Gutenberg Toolkit
GNU General Public License v3.0
84 stars 36 forks source link

Conditional JavaScript loading on frontend #55

Closed fai-sal closed 2 years ago

fai-sal commented 2 years ago

Load block related JavaScript on frontend only if the block is used in that page

Reference : https://developer.wordpress.org/reference/functions/has_block/

FYI: Styles can be loaded following same procedure @zamanq @kawshar bhai