Okay
  Print

How to load Gallery in PHP

If you want to load gallery in php, you need to paste gallery code in do_shortcode function.

For example, if gallery code is: 

[hybrid_gallery_grid ids="4619,4618,4610,4615,4614,4599,4613,4612,4616,4607,4617,4611" layout="grid" metro_style="1" size="equal" ratio_w="1" ratio_h="1" cols="3" rowheight="240" max_rowheight="-1" lastrow="nojustify" gap_x="10" gap_y="10" color="#b90000" style="1" meta_title="false" meta_descr="false" click_action="lb" link_tg="same" buttons="false" lightbox="mp" pagination="false" pg_type="more" pg_ajax="false" pg_posts="10" filter="false" animation="fadeInUp" preloader="1" ct_w_vl="100" ct_w_un="pc" ct_align="none" custom_class="" custom_id="" res="{#1024#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#800#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#768#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#600#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#480#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#1#,#align#:#auto#}}"]

You need to paste the code in php in this way:

<?php 
    echo do_shortcode('[hybrid_gallery_grid ids="4619,4618,4610,4615,4614,4599,4613,4612,4616,4607,4617,4611" layout="grid" metro_style="1" size="equal" ratio_w="1" ratio_h="1" cols="3" rowheight="240" max_rowheight="-1" lastrow="nojustify" gap_x="10" gap_y="10" color="#b90000" style="1" meta_title="false" meta_descr="false" click_action="lb" link_tg="same" buttons="false" lightbox="mp" pagination="false" pg_type="more" pg_ajax="false" pg_posts="10" filter="false" animation="fadeInUp" preloader="1" ct_w_vl="100" ct_w_un="pc" ct_align="none" custom_class="" custom_id="" res="{#1024#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#800#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#768#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#600#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#auto#,#align#:#auto#},#480#:{#w#:#auto#,#w_vl#:#100#,#w_un#:#pc#,#cols#:#1#,#align#:#auto#}}"]');
?>

Official gallery website: https://hybrid-gallery.com