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 the album id and you need to link to a page where the album code of NGG is active.
All functions can be found in /wp-content/plugins/nextgen-gallery/lib/ngg-db.php.
Related Posts:
- Calling function from within functions.php returns unwanted value
- problem with nextgen plugin
- NextGen Gallery – automatically create gallery sub page?
- Customizing NEXTGEN Gallery To link images to pages
- Removing an action from wp_footer called in a class that’s inside a bigger class
- Retrieving links and names of images from a NextGEN gallery [closed]
- What are the differences between WPINC and ABSPATH?
- Should all plugins be encapsulated in a Class?
- How can I use WordPress functions in my stylesheet?
- Disable email notification after change of password
- How can I see all the actions attached to an “add_action” hook?
- How to customise the output of the WP image gallery shortcode from a plugin?
- wp_dequeue_style not working
- How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
- Consuming an external API in WordPress?
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- Validation error: Extending Gutenberg gallery block
- When unit testing a plugin, does the plugin need to be in the wp-content/plugins directory of the WordPress tests install?
- How can I prevent a plugin from updating unless it’s minimum PHP version is met?
- How to properly insert data into custom table via plugin
- How to get the active theme’s slug?
- Preserve custom URL parameter on more pages
- How can I import a class privately into a plugin?
- __(): What if I have to pass in a variable?
- PHP code on Visual Composer Plugin
- Run WP-CLI using PHP
- Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader
- How to make simply “report” button on posts
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Plugin update error message
- Keep one user logged for a year?
- How to build an API as a plugin
- Customizing subject in comment notification e-mails
- category_name not working (not showing up in sql query debug)
- Plugin or mod for wordpress to make content publication SUPER easy
- if plugin is active? check if plugin is enabled or not?
- Using require_once in a Plugin?
- Get php var inside javascript file (making plugin)
- How can I make my custom shortcode work in a Custom HTML Widget?
- Simple form that saves to database
- WP showing “warning: call_user_func_array()”, What to do?
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- Searching users with WP_List_Table plugin
- How to Loop Plugin Option Field Set?
- Find out what is using PHP sessions in WordPress
- Making plugin unique to not conflict with plugins with the same name
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- Using nextGen Gallery.. how can I call a list of all Gallery Names?
- How to find out if option exists but is empty?
- How to call plugin path in JS?
- Get Current user email as a return string value
- Insert plugin content before body end
- PHP Deprecated: Non-static method should not be called statically
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Generate custom output for page/URL in a plugin
- how to customize hello dolly plugin?
- How can I pass a variable to wp_ajax action?
- Two embedded gallery in one post
- Update Multiple Post Meta for the Same Post In One call?
- WordPress Hook that will run when media file deleted
- Adding Custom Fields for Img in Posts
- How to store ACF custom fields data in a custom table
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- Bug in Stackoverflow styled badge system script
- How To Ignore a Filter On Applying Filter the Content In a Function
- Updating WooCommerce variable product stock issue
- Saving Plugin settings to the database
- Set a User as Author of all ‘New Posts’ posted
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- Stackoverflow type of badge plugin giving warnings in WordPress 3.5
- Post source link plugin – small modification
- Which hook callback has priority if both plugin and theme use the same hook?
- WordPress widget / plugin….fields not appearing in my widget
- How can I make content disappear when a user logs in?
- Add CSS animation as Preloader to WordPress
- Rename existing old uploaded images containing accented French characters (not during upload)
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Change destination author link
- How to turn off email you receive when registered?
- How can I execute some small piece of PHP code in a sandbox area of my WP?
- How can I include PHP-Code to my post?
- Custom Widget outputs the input but doesn’t save anything inside the textarea
- Multi step form, custom plugin
- Plugin.php: PHP Notice: Undefined offset: 0 in
- How to Create a Directory in a Plugin Folder?
- Trying to disable plugins doens’t work
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Thumb rating for wordpress – top user
- Errors while using ajax from external wordpress page
- how to display all posts Custom fields dynamically?
- Activating a single plugin via php
- Seriously stuck with some custom meta box/plugin stuff
- shortcode doesn’t work
- explanation for activate_plugin function in wordpress core
- How to get all attachment image from post ?? WordPress
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- How to send “Location” header on plugin form submit event?
- How can I ‘reactivate’ .PHP files within a WP plugin that have been marked ‘inactive’?