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/

Ajax url value to pass ‘variable’ to use in query

You say that the page URL is http://localhost:8888/dev_wordpress/wp-admin/admin.php?page=mfgroups&mingleforum_action=usergroups&do=add_user_togroup but you are trying to load http://localhost:8888/tankards_wordpress/wp-admin/wpf-addusers.php?usergroup=The+Freedom. Those don’t match is a number of ways, but I am not 100% sure what the relationship between the two is. Your question is not clear in that respect. However, even if you got that .php file to load via … Read more

How to show custom taxonomy child posts through shortcode in WordPress

That is a very messy shortcode but it looks like if you pass a term slug into the shortcode cat att this part… if (of_get_option(‘shortcat_video’, ‘1’) == ‘1’) { $query = array( ‘posts_per_page’ => $items, ‘orderby’ => $orderby, ‘order’ => $order, ‘post_type’ => ‘video’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘videos’, ‘field’ => ‘slug’, ‘terms’ … Read more

how to load a file from a plugin when a url is passed

I ended up answering my own question by using the following code add_filter( ‘template_include’,’include_filter_template_function’, 1 ); function include_filter_template_function($template_path ) { $template_path = plugin_dir_path( __FILE__ ) .’filter.php’; return $template_path; } and checking the params on that page. I’m sure there is a more elegant way to do this but it works for me. 🙂