How to retrieve media images urls in different sizes?

I don’t understand your code in full (how your foreach’s actually fill your list item), but, as for the specific question, I think that the function you want is wp_get_attachment_image_src(); So (illustratively): $thumbnail_src = wp_get_attachment_image_src( $picture->ID ); $image->thumbnail_url = $thumbnail_src[0]; $full_src = wp_get_attachment_image_src( $picture->ID, ‘full’ ); $image->full_url = $full_src[0];

Gallery image caption inside link

You should get the attachment differently. Use wp_get_attachment_url for the file url https://codex.wordpress.org/Function_Reference/wp_get_attachment_url In your case it’s an image so I would suggest wp_get_attachment_image_src so you can define an image size. https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/ This way you can greate your own “template” to echo the image link. To get the image metadata you can simply use get_post( … Read more

Add image to gallery with slug

https://codex.wordpress.org/Gallery_Shortcode By default the gallery shortcode will only accept IDs or if left blank will default to current page. You need to create a plugin and register your own shortcode or download one that already exists. https://www.google.co.uk/search?q=gallery+load+by+url+wordpress&oq=gallery+load+by+url+wordpress&aqs=chrome..69i57.9981j0j4&sourceid=chrome&ie=UTF-8

Implementing Lightbox Photo Gallery in

I got the answer from someone else and got it working. To summarize, the problem was not having the right use of WP functions to call the custom post thumbnail image dynamically. Hence the BueggetteBox.js plugin (a lightbox plugin) functionality would work properly when you clicked on a custom post thumbnail from the gallery within … Read more

WordPress WebSite is jumps while scrolling bottom [closed]

You have some css that is conflicting and causing the issue when the top menu sticks absolute on scroll down and the header hides. In your media.css on line 340 you have: @media (min-width: 768px){ .main-navigation { clear: both; display: block; float: left; width: 100%; } } Changing that in live dev tools to: @media … Read more

Add #content to next_image_link()

This is kinda dirty, but I can’t find a better hook: function add_content_hash( $link ) { $link = str_replace(“‘ title=””, “#content” title=””, $link); return $link; } add_filter( “wp_get_attachment_link’, ‘add_content_hash’ );

WordPress Gallery not being output correctly/consistently

It looks like you have the gallery settings pointing to the attachment pages instead of the media files directly. You can try this shortcode instead of the default if you want different sizes, you can change the size parameter to size=”thumb”, size=”medium”, size=”large” or to the image-size-name you want to use.