Different Permastruck Between Ajax Request & Normal Request

So i examine several plugin to learn how it work and find solution by using add_permastruct add_permastruct( ‘job’, “https://wordpress.stackexchange.com/” . $slug . ‘/%job%’, array( ‘with_front’ => false, ‘ep_mask’ => EP_NONE, ‘paged’ => false, ‘feed’ => false, ‘forcomments’ => false, ‘walk_dirs’ => true, ‘endpoints’ => false, )); and the problem is solved 🙂

Permalinks for thumbs with get_post_gallery

You need to split the get_post_gallery ids string into an array before you can loop through it. $parent = get_post_field( ‘post_parent’, get_the_ID() ); $gallery = get_post_gallery($parent, false); $ids = explode(‘,’, $gallery[ ‘ids’ ]); foreach($ids as $attachment_id) { $img_src = wp_get_attachment_image_url($attachment_id, ‘medium’); $img_srcset = wp_get_attachment_image_srcset($attachment_id, ‘medium’); $title = get_the_title($attachment_id); ?> <a href=”https://wordpress.stackexchange.com/questions/212996/<?php echo get_permalink($attachment_id); ?>”> <img … Read more