Category : image-gallery

I am trying to get metadata associated with the featured image but get_post_meta keeps returning empty. $image_alt_text = get_post_meta($image_id, ‘_wp_attachment_image_alt’, true); This works and returns the data, but the code below does not work: $image_description = get_post_meta($image_id, ‘_wp_attachment_description’, true); $image_caption = get_post_meta($image_id, ‘_wp_attachment_caption’, true); These two return empty. I filled out those fields but I ..

Read more

I have several gallery pages which are set up identically. Each page generates a set of pictures through a php script from a folder. When an image is clicked the image will zoom in (scale). This all works well except when the larger scaled image falls outside of the parent div. In all cases, except ..

Read more

I using Carbon Fields in WordPress. I have a problem, beacause I can not show media gallery. My code in functions.php function crb_attach_post_meta_aboutus() { Container::make( ‘post_meta’, __( ‘Singlebramy’, ‘single’ ) ) ->where( ‘post_type’, ‘=’, ‘dla-domu’ ) ->add_fields( array( Field::make( ‘media_gallery’, ‘crb_media_gallery’, ‘Galeria’ ) ->set_type( ‘image’ ) )); } I tried use foreach but not work. ..

Read more