Meta Box Value not saving / populating?

Variables do not expand inside single quotes, so this– selected( $selected, ‘$post_type->name’— is literally checking for a string that looks like ‘$post_type->name’. If you are saving the option names, it should work if you just remove the quotes (though I did not run your code to test that). Your might be able to exclude what … Read more

Displaying All Parent Pages as Featured Images

To get all the “root” pages of a site: $args = array( ‘post_type’ => ‘page’, ‘child_of’ => 0, ); $pages = get_pages( $args ); foreach( $pages as $page ) { if( has_post_thumbnail( $page->ID ) { $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘large’ ); $imgwidth = $imgdata[1]; // thumbnail’s width $imgheight = $imgdata[2]; // thumbnail’s height } } … Read more

How to show an image popup when one clicks on an image thumbnail?

1) enque thickbox on front end add_action(‘init’, ‘myplugin_thickbox’); function myplugin_thickbox() { if (! is_admin()) { wp_enqueue_script(‘thickbox’, null, array(‘jquery’)); wp_enqueue_style(‘thickbox.css’, “https://wordpress.stackexchange.com/”.WPINC.’/js/thickbox/thickbox.css’, null, ‘1.0’); } } 2) Add thickbox to all your images that are displayed by the_content(); function fb_add_thickbox($content){ $content = preg_replace(‘/<a(.*?)href=”https://wordpress.stackexchange.com/questions/106603/(.*?).(jpg”jpeg|png|gif|bmp|ico)”(.*?)><img/U’, ‘<a$1href=”$2.$3″ $4 class=”thickbox”><img’, $content); return $content; } add_filter(‘the_content’, ‘fb_add_thickbox’, 2); sources: http://wordpress.org/support/topic/how-to-implement-thickbox-to-all-images-which-contain-a-refered-link http://www.ultimatewebtips.com/how-to-use-wordpress-native-thickbox-support-in-front-end/

Show uploaded images in full size

WordPress creates 3 different sizes as far as my research goes. Read this on WP image handling -> http://www.studiograsshopper.ch/web-development/wordpress-featured-images-add_image_size-resizing-and-cropping-demo/ You can easily customise the default Media sizes by changing the default sizes in Dashboard > Settings > Media. You can grab any of those sizes. See the codex @ http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail The function you want is: … Read more