How do you get all the urls of images attached to a post?

You need to loop through the attachments within your post loop, replace the section of code you posted with this (put this together from some other code I found related to a similar problem, but couldn’t test it): </BasicDetails> <?php $args = array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, // show all … Read more

Create Custom URL structure for specific Post category

Try these steps: Step #1: Replace this: add_action(‘generate_rewrite_rules’, ‘custom_rewrite_rules’); function custom_rewrite_rules( $wp_rewrite ) { $regex = ‘/[\s\S]/’; $new_rules = array( trailingslashit(‘testimonials/’.$regex) => ‘/?p=’. get_page_by_path(‘$matches[1]’, OBJECT, ‘post’)->id ); $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; return $wp_rewrite; } ..with this one: add_action( ‘init’, ‘custom_rewrite_rules’ ); function custom_rewrite_rules() { add_rewrite_rule( ‘testimonials/([^/]+)(?:/([0-9]+))?/?$’, ‘index.php?category_name=testimonials&name=$matches[1]&page=$matches[2]’, ‘top’ // The rule position; either ‘top’ … Read more

WordPress and $_GET Params

For custom parameters you should register them with WordPress: add_action(‘init’,’wpse46108_register_param’); function wpse46108_register_param() { global $wp; $wp->add_query_var(‘anyParamName’); } Then the value of ‘anyParamName’ can be found with get_query_var $anyParamNameValue = get_query_var(‘anyParamName’).