Tag Info

New answers tagged

-1

Did it by the following code function get_page_gal_img_ids($page_id){ $p=get_post($page_id); $s=$p-> post_content; $s= stristr($s, 'ids'); $s= str_replace(']', ' ', $s); $s= stristr($s, '"'); $s= str_replace('"', ...


0

I used a simple solution... I found the class name of the gallery which is .photogalleria so i changed the css display to none in my css. .photogalleria{ display:none; }


0

Still never found a solution that actually fixed the problem. In the end, my work-around was to break each gallery into sub-galleries of less than 200 images and then use the tag to paginate the main page. This avoided the 995 file limitation as well as vastly improved performance since it only ever tried to load a couple hundred images. Not ideal, but ...


1

Depending on how your Galleria plugin is interacting with the attachment image filters, you should be able to inject your data attribute using the wp_get_attachment_image_attributes filter. Obviously, the attribute would be added for anything using wp_get_attachment_image(), but it will do what you're asking. /** * Filter attributes for the current ...


-1

There are lot of photo gallery plugins available for WordPress. But I've refer this photo gallery : https://wordpress.org/plugins/contus-video-gallery/


0

Read the documentation for get_post_gallery and you'll see that the function is intended to return thumbnail image sources. The function also returns a string IDs of images. So you can split it into array, and run wp_get_attachment_link within the same loop (with a defined index to reference correct image file ID) to query for full image source.


2

The gallery_shortcode with its default styles can be found in wp-includes/media.php line 906 to 1089. There is also an article in the codex that might be useful: Gallery Shortcode. There is also a couple of filters available as you can see from the source code that you can use The gallery shortcode uses the default thumbnail size, which is 150 x 150 px. ...


3

I got curious about the SQL way of finding all posts without any attachments. Method #1 - Sub query with NOT IN Here's my first attempt to construct such a query: global $wpdb; $sql = " SELECT p1.ID, p1.post_title FROM {$wpdb->posts} p1 WHERE p1.post_type = 'post' AND p1.post_status = 'publish' ...


5

If you're comfortable with the complete opposite of the linked answer, you simply could use this query to fetch all posts that have an attachment and then use their IDs as the post__not_in parameter of \WP_Query: $attachment_args = array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => 'inherit', ...


0

There are two plausible answers. There is a good chance this is a restriction on the wordpress site settings. In multisite this is in: Network -> Settings: Upload Settings Site upload space: [checkbox] Limit total size of files uploaded to [xxx]MB. Default is 50MB. Unchecking this or increasing the limit should solve the issue. The side ...



Top 50 recent answers are included