CSS styling of native (inbuilt) wordpress thumbnails [closed]

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 … Read more

Load Gallery Images with Title on Homepage BX Slider

I would recommend using this plugin instead: https://wordpress.org/plugins/cpt-bootstrap-carousel/ It works well with the built-in Twitter Boostrap 3 in Roots.oi theme (Responsive) and it comes along with a CPT named carousel. Looking in your code: The get_post_gallery_images() function only returns the url and it doesn’t contain any Gallery Image Title content.

Where is image gallery information saved?

WordPress doesn’t necessarily save a ton of gallery information in the database. Each time you upload an image ( or any media I believe ) it gets assigned to a built-in post type called simply “attachment” which gives it a unique ID. Whenever you go through the Media Library Popup and create a gallery, WordPress … Read more

Get title attribute from galleries

WordPress actually uses a Built-in Post Type for Attachments ( called attachment ) so you can use some of the same functions like get_the_title() which is what you’re looking for. Though, I did take some liberties by modifying your code below, using a foreach instead of a for loop: $gallery = get_post_gallery( 7, false ); … Read more

WordPress Gallery Thumbnail images look blurry

luckily I found the answer shortly after posting this question. My thumbnail size setting (Settings/Media) was 150 x 150px – cropped. So when I displayed them on my page, desktop size, in a row of 4, the thumbnails were getting stretched to 282 x 282px. I changed it to this new size and used a … Read more

Get gallery images from page ID

You could use the get_post_galleries_images function, which returns an array of all the galleries from whatever post ID you specify. The following is a quick function that will display all the images: function na_get_gallery_image_urls( $post_id, $number = false ) { $post = get_post($post_id); $count = 0; // Make sure the post has a gallery in … Read more

Media gallery images url instead of ID on WP API Response

This is the correct way to achieve it is this: function show_main_image($object, $field_name, $request){ $custom_fields = get_post_custom($object[‘id’]); $main_image = $custom_fields[‘main_image’]; $arregloimg = explode(‘,’,$main_image[0]); $image_urls = array(); foreach ( $arregloimg as $key => $value ) { $image_urls[] = wp_get_attachment_url($value,’thumbnail’); }; return $image_urls; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)