Custom post type order by post_title

I found the solution. When I take my first query and make it like this: <?php return [ “post_type” => [ “employees” ], “post_status” => [ “publish” ], “orderby” => [ “post_title” => “ASC” ], “posts_per_page” => “99” ]; the sorting is working. So I replaced: “orderby” => [ “post_title” ], “order” => [ “ASC” … 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

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