Forum Replies Created
- AuthorPosts
RattusKeymasterPost link to your gallery page, please.
November 14, 2016 at 01:43 in reply to: use Magnific Popup for other images (not in gallery/album) on the site #8020
RattusKeymasterAdd code below to your theme functions.php:
function add_theme_scripts() { wp_enqueue_style( 'magnific-popup' ); wp_enqueue_script( 'magnific-popup'); } add_action( 'wp_enqueue_scripts', 'add_theme_scripts' );then somewhere in your theme’s main js file add something like this:
jQuery(document).ready(function() { jQuery('a').not('.gmedia_gallery a').has('img').magnificPopup({type:'image'}); });November 14, 2016 at 01:22 in reply to: Hide Individual Item pages/posts from Search Engine Indexing #8019
RattusKeymasterAdd code below to your theme functions.php file:
function search_exclude_by_post_name( $search, $wp_query ){ global $wpdb; if ( empty( $search ) ) return $search; // skip processing - no search term in query $name_like = 'exclude_'; $search .= " AND ($wpdb->posts.post_name NOT LIKE '{$name_like}%')"; return $search; } add_filter( 'posts_search', 'search_exclude_by_post_name', 500, 2 );Now you can select Gmedia items -> click Action -> Batch Edit -> Edit filename -> set something like ‘exclude_{filename}’ and apply.
All Gmedia items with ‘exclude_’ in the name will be skipped from search. (Note: posts with permalink name started with ‘exclude_’ will be skipped too).November 14, 2016 at 00:28 in reply to: Custom Template for Gmedia Galleries, Albums and Items #8017
RattusKeymasterFor ‘single-gmedia_album.php’ file:
if('gmedia_album' == $post->post_type){ global $gmDB; $gmedia_term_id = get_post_meta($post->ID, '_gmedia_term_ID', true); $gmedia_term = $gmDB->get_term($gmedia_term_id); echo apply_filters('the_content', $gmedia_term->description); /* Album Description */ $gmedia_term_meta = $gmDB->get_metadata('gmedia_term', $gmedia_term_id); foreach($gmedia_term_meta as $meta_key => $meta_value){ if($meta_key[0] == '_'){ continue; } /* Skip protected meta */ echo "{$meta_key}: {$meta_value[0]}" /* $meta_key - is custom field name; $meta_value - is array of values for the custom field name. */ } }
RattusKeymasterSeems like WP SlimStat plugin prevent Mosaic to open external links in lightbox.
RattusKeymaster@popo Just click “Build Query” button and you’ll see there are a lot more options and possibilities to choose which files you want to show in the gallery.
RattusKeymasterLatest version of plugin have setting “Do not keep original images”. Go to Setting page -> Other Settings tab -> enable “Delete original images” option and update.
RattusKeymasterGo to edit gallery -> Advanced Settings -> add to Custom CSS:
For the Phantom:
.gmPhantom_ThumbLabel { font-weight: normal !important; }
For the Phantom Pro:
.gmPhantomPro_ThumbLabel { font-weight: normal !important; }November 12, 2016 at 18:52 in reply to: Lightbox in Phantom gallery totally changed after update #7991
RattusKeymasterOn the Gmedia Modules admin page scroll to the very bottom to install Phantom Old version.
RattusKeymasterGo to Gmedia Modules page -> update RealSlider module to the version 2.11. It will be aligned to center automatically if gallery width less than parent element width.
RattusKeymasterPost link to your gallery page, please.
RattusKeymasterThis reply has been marked as private.
RattusKeymasterMosaic module automatically set thumbnails size based on how many Columns you set. If Columns = 0 (auto), then width is about 250-300px. Height of thumbnails depends on the “Prevent Crop” setting. If it is unchecked, then Mosaic tries to make every column be equal height and crop some of thumbnails. If “Prevent Crop” checked, then thumbnails will not be cropped but columns might be with different height.
November 12, 2016 at 18:13 in reply to: Custom Template for Gmedia Galleries, Albums and Items #7984
RattusKeymasterHello, I’ll be glad to help you.
Here is how to add theme templates for custom post types: https://codex.wordpress.org/Post_Type_TemplatesGmedia create few post types in WordPress:
1) “gmedia” – for single gmedia items
2) “gmedia_album” – for album pages
3) “gmedia_gallery” – for gallery pagesAll logic for displaying these custom posts placed in ‘grand-media/inc/frontend.filters.php’ file. Let me know if you need some Filters or Actions to be added to the code, so you could use them in your theme.
RattusKeymasterWhat module you use for gallery?
- AuthorPosts
