Show Slider
-
Hi,
I’m working on the Nivo Slider for my theme, but I need some help. I have used the Meta Box plugin to create some metaboxes for different posttypes like the Slider post type. I have used the type: ‘plupload_image’ and for every image you upload you can set a Caption and A slider URL (for if you click on the slide) Every image is one slide.
To add the caption and Slider URL field I’ve used this script:
function elex_image_attachment_fields_to_edit($form_fields, $post) { $form_fields["sliderurl"] = array( "label" => __('Slider URL','elex_textdomain'), "input" => "text", "value" => get_post_meta($post->ID, "_sliderurl", true), "helps" => __('Please enter full URL' ,'elex_textdomain'), ); $form_fields["slidercaption"] = array( "label" => __('Caption','gxg_textdomain'), "input" => "text", "value" => get_post_meta($post->ID, "_slidercaption", true), "helps" => __('Caption for this slide. Use </br> for line breaks','elex_textdomain'), ); return $form_fields; } function elex_image_attachment_fields_to_save($post, $attachment) { if( isset($attachment['sliderurl']) ){ update_post_meta($post['ID'], '_sliderurl', $attachment['sliderurl']); } if( isset($attachment['sliderurl']) ){ update_post_meta($post['ID'], '_slidercaption', $attachment['slidercaption']); } return $post; } add_filter("attachment_fields_to_edit", "elex_image_attachment_fields_to_edit", null, 2); add_filter("attachment_fields_to_save", "elex_image_attachment_fields_to_save", null, 2);
My Question is: How can I display all the images with the caption and url.
I hope you know what I mean.
Thanks,
Julian
- The topic ‘Show Slider’ is closed to new replies.