New answers tagged

0

I know this has been a while, but I found this page looking for the same answer. Once I discovered the solution, I thought I would share it here to help you or someone in the future. Once you convert the classic to blocks, you can multi select the images, and then the convert button allows you to convert to a gallery. I noticed mine stayed at thumbnail ...


0

You can use bootstrap grid system . https://getbootstrap.com/docs/4.0/layout/grid/


0

Since wordpress version 4.0 there is a wordpress core function attachment_url_to_postid that "Tries to convert an attachment URL into a post ID." But these function has huge flaw cos it can't convert custom image url sizes. Almost all top answers before trying solve these problem, but all of them have a very heavy database query trying to get all existing ...


1

get_post_format() returns the post format slug for either the current post, when used inside a loop, or a given post, when a WP_Post object or an integer post ID is passed to it as a parameter. So, if you're using the function in a posts loop, then you can use it like this, while ( have_posts() ) { the_post(); if ( 'gallery' === get_post_format() ) { ...


0

Your PHP generates this html for gallery grid item: <div class="sh-image-gallery-item"> <div class="sh-gallery-item"> <div class="post-meta-thumb"> <img src="https://www.coleopterafarm.cz/wp-content/uploads/2019/12/PICT9418-660x660.jpg" alt="Carabus (Coptolabrus) smaragdinus brannicki"> <a class="sh-overlay-...


Top 50 recent answers are included