Creating image gallery in wordpress

why not to use a plugin like nextgen-gallery? You can ask the plugin to scan a dir to build a gallery, then are many possibilities to display the images. If this cannot be a solution you need to access via php directly the filesystem, not difficult but some work needed 😉

Add gallery id to rel attribe of wp_get_attachment_link

That filter passes more arguments than you are using. return apply_filters( ‘wp_get_attachment_link”https://wordpress.stackexchange.com/questions/134811/,”<a href=”https://wordpress.stackexchange.com/questions/134811/$url”>$link_text</a>”, $id, $size, $permalink, $icon, $text ); The second of those is the one you need. So you need to alter you callback to use the second parameter, and alter your add_filter to ask for it by setting the fourth argument to 2. … Read more

Moved blog – galleries don’t work

Gallery can include either: specific images, in which case their IDs are explicitly listed in shortcode all images attached to the post, in which case shortcode doesn’t specify that (as in your example) So your description is a little contradictory – if images weren’t attached to the post, then that example wouldn’t have worked in … Read more

gallery image size

As an alternative to removing the image sizes (which digging a little deeper looks very complicated), why not change the size of the images in your gallery? If you use a larger image they will “fill the space” at larger screens and then shrink down for smaller screens. The Gallery shortcode has a size parameter … Read more

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