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

cURL needing to loop through all “next_page”

You could try something like: $url=”https://oc.com/api/v1/employees/?page=1″; $data = array(); while ( $url ) { $response = $this->request( $url ); $data = array_merge( $data, $response->data ); // if this is not the last page, get the next page URL if ( $response->paginator->current_page != $response->paginator->last_page ) { $url = $response->paginator->next_page; } else {$url = false;} } return … Read more

Check the database for a postmeta field

You don’t need to set a new WP_Query since you are looping through the data of the octopus. I would do the following in your case: Create a function that checks if there is a post with an octopus_id given function post_with_octopus_id_exists( $octopus_id ){ //If for some reason the $octopus_id given is empty return false … Read more