Javascript Tab Gallery with Advanced Custom Fields

Fixed it! This is the resulting code: <?php $images = get_field(‘extra_photos’); if( $images ): ?> <div class=”row2″> <?php foreach( $images as $image ): ?> <div class=”column2″ > <img src=”https://wordpress.stackexchange.com/questions/337143/<?php echo $image[“url’]; ?>” alt=”https://wordpress.stackexchange.com/questions/337143/<?php echo $image[“alt’]; ?> ” onclick=”myFunction(this);”/> </div> <?php endforeach; ?> </div> <!– The expanding image container –> <div class=”container2″> <!– Close the image … Read more

Images 404 after wp migration to a subdomain

Image URLs are stored within the ‘post’ entry that is the media item. So you can change each one manually via the Media screen. Or use a search/replace plugin to do it all at once. I like the “Better Search and Replace” plugin. Just enter the old URL’s domain, and the new one. Use the … Read more

get_post_gallery with Gutenberg

Using birgire’s suggestions, I came up with the following solution that is working well with both the old pre-WP 4.x data and the newer posts that have been added under 5.0. // if there is a gallery block do this if (has_block(‘gallery’, $post->post_content)) { $post_blocks = parse_blocks($post->post_content); $ids = $post_blocks[0][attrs][ids]; } // if there is … Read more

add custom link to gallery images

This is the exact plugin you need – https://wordpress.org/plugins/gallery-custom-links/ No code customizations needed. For fixed image link (http://www.example.com): $args = array( ‘post_type’ => ‘post’, ‘name’ => ‘partners’ ); $logo_img = new WP_Query( $args ); ?> <div class=”container-fluid” id=””> <div class=”row” style=”margin-top:1em;margin-bottom:1em;”> <?php if( $logo_img->have_posts() ): while( $logo_img->have_posts() ): $logo_img->the_post(); $logo_gallery = get_post_gallery_images( $post->ID ); if( … Read more

ACF Gallery field images donwload

I’m using this same code and I was able to figure out where the error’s happening. The path that gets generated when this line of code is called is wrong: $zip->open( $destination, ZipArchive::CREATE ); It spits out your home directory and then appends the value of $destination to it. In my case (it’s not the … Read more

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