Integration:WPG2 Operations - Pages - Gallery Codex
Personal tools

Integration:WPG2 Operations - Pages

From Gallery Codex

This Page Relates to WPG2 Version 3.0

Q: How can I change the URL of the embedded WPG2 page?

  • You can change the URL by changing the "Page Slug" under Manage -> Pages -> Edit for the embedded page. You can also change the "Page Title" while you're there, if you like.
  • If you have Gallery2 Template Caching turned on you will need to flush your Gallery2 Template Cache to force the G2 to regenerate its links, you can do this via the Gallery2 Site Admin -> Maintenance Menu -> Delete Template Cache.

Q: How can I redirect the URL of the old 2.x wp-gallery2.php file to the embedded WPG2 page?

  • If you would like to redirect your old wp-gallery2.php links to your new embedded page, add the following at the top of your WordPress-generated .htaccess file:
Redirect 301 /wp-gallery2.php http://www.yourdomain.com/wpg2

Q: How can I add my Wordpress sidebar to embedded WPG2 Page?

  • We actually do not recommend this because you are going to find most Wordpress themes already are going to struggle to have enough room to display Gallery2 content however you can add the Wordpress Sidebars in two ways..
    • Edit the wpg2template.inc file (in the WPG2 plugin directory), look for the line echo $g2data['bodyHtml']; //Display the gallery content and add get_sidebar(); in the if/else statement before this line.

if ( $wpg2_option['g2_externalheader']!="Yes" ) { get_header(); get_sidebar(); //Include any plug-in header content set in the plugin options echo stripslashes($wpg2_option['g2_header']);

} else include (TEMPLATEPATH.'/wpg2header.php'); }

    • If you are using a Custom WPG2Header (or Custom WPG2Footer) then add the statement <?php get_sidebar(); ?>