Responsive WordPress Gallery

You need add some CSS to make it auto clear left after each 3th item and need to hide <br> tag Update your code like this- /* For displaying 3 columns on tablet */ @media only screen and (max-width: 800px) { .gallery-columns-5 .gallery-item { width: 33% !important; } .gallery-columns-5 br { display: none; } .gallery-columns-5 … Read more

Gallery attachment not found

I managed to figure this out by playing around but it’s a bit disappointing that I could find no solutions online. There were a lot of people reporting the issue but with no response. The images were included in another post which was set to “draft” this for some reason put the images into some … Read more

Error while uploading photos

make sure you’ve tried… flushing any caching plugins you might be running, as well as server and/or browser caches. deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). If you can’t get into your admin dashboard, try … Read more

Post gallery loop with thumb and full size

There might be other possibilities to this, mine is given below .. First you use the get_post_gallery function to store the image id’s in a separate array .. if ( get_post_gallery() ) { $gallery = get_post_gallery( get_the_ID(), false ); $galleryIDS[] = array(); /* Loop through all the image and store them one by one */ … Read more

Pulling in Column Count in Custom Gallery

Sprintf is a way to use variables within a string easily. %d designates a digit and %s is any string. So think of it like this sprintf( ‘<div class=”%s”>%s</div>’, $var1, $var2 ); So for your example, you’d need something like: $output = sprintf( ‘<div class=”gallery gallery-columns-%s” itemprop=”image” itemscope itemtype=”http://schema.org/ImageGallery”>%s</div>’, $columns, $output ); The only thing … Read more

WordPress Gallery is not displaying

Waited a lot but couldn’t find an answer… I found the issue but doesn’t know how to resolve it. But fortunately there is a way around it. I have been using wordpress’s pre_get_posts hook to set a tax_query which looks like this: add_action( ‘pre_get_posts’, ‘homeInjector’ ); function homeInjector( $query ) { if ( $query->is_home() ) … Read more

Add title tag to image in wordpress gallery

The ‘img’ tag is built via the theme code for display on the page. So, you would have to modify the theme code to add to the img tag. Note that modifying theme code directly is not generally advised, as a theme update will overwrite your changes. “Child” themes are best used for this modification.

Output all images from gallery inside a slider

Ok, so, I found this function, but it wasn’t in the codex. It came from Pippin’s Plugins, just to clarify for any future readers. It appears this function was used as a filter added onto the content, and will only run when filtering existing content, because it’s retrieving & replacing the galleries placed inside the … Read more

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