Displaying NextGen Gallery using value from meta not working
Perhaps try: echo do_shortcode(‘[nggallery id=’ . $meta . ‘]’);
Perhaps try: echo do_shortcode(‘[nggallery id=’ . $meta . ‘]’);
Go to: Admin panel -> Gallery -> Options -> Gallery and set the checkbox: “Deactivate gallery page link” “The album will not link to a gallery subpage. The gallery is shown on the same page.”
This takes care of NextGEN’s slideshow and CSS, as well as the Shutter script and CSS that it also enqueues by default. add_action(‘wp_print_scripts’, ‘wpse_82982_removeScripts’); add_action(‘wp_print_styles’, ‘wpse_82982_removeStyles’); function wpse_82982_removeScripts() { wp_dequeue_script(‘ngg-slideshow’); wp_dequeue_script(‘shutter’); } function wpse_82982_removeStyles() { wp_dequeue_style(‘NextGEN’); wp_dequeue_style(‘shutter’); } But: are you sure you want to do that? Maybe you can be a little selective, and … Read more
A .mo file is the machine readable Version of a .po file, which in turn holds the translation of a .pot file. Hence, the latter is what you want to have in the first place. And if it is your theme you want to localize, you certainly do not need a random plugin’s simplified Chinese … Read more
Templates The most important feature improvement in Version 1.00 is the template engine. Custom templates are PHP files that can be stored in the folder nggallery, inside your theme directory. NextGEN gallery look up always first into this folder if there are the vaild template file. For example, if you are using the default WordPress … Read more
After analyzing nextgen core files I have found solution to my problem. I hope it will be useful for somebody. global $nggdb; $get_gall_id = get_post_meta($post_id, ‘galerijos_id’, true); $gall_ids = $nggdb->get_ids_from_gallery($get_gall_id); $images = $nggdb->get_gallery($get_gall_id); foreach ( $gall_ids as $gall_id ) { echo $images[$gall_id]->imageURL .'<br>’; }
You don’t have to insert image into post after attaching it to this post. When you edit post, click on ‘Add Media’ button. Upload your image and when it’s uploaded just close the ‘Insert Media’ dialog (use ‘x’ button in top right corner and not ‘Insert into post’ button). You can then get (and show) … Read more
Put this into your page template: <?php global $nggdb; $galleries = array(); $album = $nggdb->find_album(1); foreach( $album->gallery_ids as $galleryid ){ $gallery = $nggdb->find_gallery($galleryid); $galleries[$galleryid][‘title’] = $gallery->title; $galleries[$galleryid][‘url’] = get_bloginfo(‘url’) . ‘/portfolio/?album=all&gallery=’ . $galleryid; } foreach($galleries as $category){ echo ‘<a href=”‘ . $category[‘url’] . ‘”>’ . $category[‘title’] . ‘</a><br />’; } ?> You have to adapt … Read more
Make shure your theme function have add_theme_support( ‘post-thumbnails’ ); to add a custom image size use add_image_size( ‘thumb-one’, 25, 30 ); for more details have a looh here
In gallery settings there is an checkbox option called “Deactivate gallery page link:” When that is checked “The album will not link to a gallery subpage. The gallery is shown on the same page. ” You may have already done it but if not uncheck it if its checked and see what happens. David