Giter VIP home page Giter VIP logo

convert-nextgen-galleries's Introduction

Convert NextGEN Galleries to WordPress

This is a WordPress plugin that will convert image galleries in the NextGEN Gallery format into the native WordPress gallery format.

A list is generated showing all the posts and pages that are using NextGEN galleries. They can be converted one page at a time, or all the pages can be converted at once.

The [nggallery] shortcodes are replaced with corresponding [gallery] shortcodes, and all the images are copied over from the NextGEN image area into to the usual WordPress Media center.

How to use it

  • Backup your database and files.
  • Install and activate this plugin. If you're into Git, you can do a git clone in your plugins folder, or alternatively you can download the raw version of the convert-nextgen-galleries.php file and put it in your plugins folder.
  • Browse to the 'Convert NextGEN Galleries' page under 'Settings'.
  • Click 'List galleries to convert' to see what galleries will be converted.
  • Click 'Convert' on a singe post, to convert just that post, or 'Convert all galleries', to convert all.

It's a good idea to run the conversion on one page as a test before converting all your galleries. It may take some time to convert if there are lots of images, so you may want to do the conversion a few pages at a time.

The NextGEN galleries and images remain untouched so, if you want to revert, you can manually restore the [nggallery] shortcodes and the NextGEN galleries will work as they did before.

If you're happy with the results, and all galleries have been converted, you can uninstall the NextGEN plugin and remove any NextGEN gallery folders and database tables.

How it works

The plugin works by finding all the posts and pages with [nggallery] shortcodes inside. It then loops over all those shortcodes and finds the corresponding NextGEN galleries for them. All the images in those galleries are copied and added to the regular WordPress Media library. The [nggallery] shortcodes are replaced with [gallery] shortcodes including the ids of those images converted.

Additional options

The admin page can be found at:

/wp-admin/options-general.php?page=convert-nextgen-galleries.php

You can append additional arguments to that URL to perform the different operations.

post

If you want to work the galleries on one specific post, you can use &post=.

For example, to list all galleries on page 43 you can use:

/wp-admin/options-general.php?page=convert-nextgen-galleries.php&action=list&post=43

Then to convert those galleries you can use:

/wp-admin/options-general.php?page=convert-nextgen-galleries.php&action=convert&post=43

max_num

If you want work the galleries on the first 4 posts, you can use &max_num=.

For example, to list all galleries on the first 4 pages you can use:

/wp-admin/options-general.php?page=convert-nextgen-galleries.php&action=list&max_num=4

Then to convert those galleries you can use:

/wp-admin/options-general.php?page=convert-nextgen-galleries.php&action=convert&max_num=4

Screenshot

Here is a screenshot of the admin screen listing the images to convert:

Listing galleries to convert

convert-nextgen-galleries's People

Contributors

stefansenk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.