• Ok, i will try to be clear about this: i have been to the authors support forums and asked this question, no response. so i hope someone here has done this before (it seems very easy). Using the WPG2 v1 plugin. Up until now, i have hard-coded the link into my themes (ie https://www.myaddress.com/wp-gallery2.php). Now, i want to make wp-gallery2.php a WP “Page”. I have created a “Page” with the title of “Photos” and saved the page. This makes a post-slug of “photos”, so the link is wrong now (is now https://www.myaddress.com/photos). Should be https://www.myaddress.com/wp-gallery2.php; so i changed the post-slug to wp-gallery2.php and as we now know, can’t have a “.” in the post-slug (so it makes it wp-gallery2php). How in the world do you make a page for WPG2? any help is appreciated.
    *EDIT* this is not a support question

Viewing 4 replies - 1 through 4 (of 4 total)
  • there’s a forum dedicated to WPG2 on galleryembedded website, that might have the answer for this

    I think you basically can use your page called /photos, and on the Page Template (not the Body of WritePage, I think) for that page you put a single line of PHP code that WP-G2 instructions tell you. And that code calls the gallery page to display right there on your page.

    hope this helps

    Thread Starter carnold

    (@carnold)

    Yes, i know about the forum, that is why i posted this on my first post:
    i have been to the authors support forums and asked this question, no response
    I have tried your suggestionm many times (before i posted here and the authors forums) but could not get it to work. The page-slug always says “Photos”; therefore it would always take me to the “Photos” section off the root of my site (not what i want). You said: “I think you basically can use your page called /photos, and on the Page Template (not the Body of WritePage, I think) for that page you put a single line of PHP code that WP-G2 instructions tell you”. where do you see these istructions that tell you this? All i see is (from the authors site):
    Gallery2 via the Plug in Embedded Page
    From WordPress Gallery2

    To access Gallery2 via the plug in (also know as the embedded page) create a link to yoururl/wp-gallery2.php or what you have configured your embedded page name to be. (Gallery2 Options – Configuring Embedded Options)
    Thank for the help!

    Ok, ok, Now I see that you already have a folder called /photos/ that is used on your website. It’s a common mistake, but you shouldn’t make a post-slug in your wordpress where the URL matches an existing actual-folder on your website. Only make a post-slug that’s like a fake folder kind of, and be sure you don’t later create a folder-name that duplicates one of your slugs.

    So in your case, Create the Page called “Photography” to make /photography instead of /photos.

    Now return to my instructions above: simply put the 1 line of PHP which summons your gallery to display on this Page. I am 95% sure this 1 line of PHP can be found somewhere in the WP-G2 documentation, I am pretty sure it appears on one of the WP-G2 control panel pages in your WP-Admin, after you have properly installed and validated WP-G2. If not there then it is in the READ ME for WP-G2. This is no concern of Gallery2, so make sure you’re seaching WP-G2’s instructions to find this code.

    I’m sorry I don’t remember the code but it’s basically something like this
    <? get_gallery2>
    That’s not it but something not much larger than that

    I wanted to do the same thing, and it took me forever to figure out what I needed to do. Here is the answer, step by step.

    1. Copy the contents of wp-gallery2.php to a new file in your theme directory and call it something nice like ‘GalleryPageTemplate.php’.
    2. Open up the theme editor [or edit the file however you’d like].
    3. Put the following code at the very top of the page:
      <?php
      /*
      Template Name: Gallery2 Page
      */
      ?>
    4. Remove or comment out the line that calls wp-config.php:
      require('./wp-config.php');
    5. In the admin panel, go to Write->Write Page and create a new Page, say ‘photos’. Leave the body blank, but select ‘Gallery2 Page’ in the ‘Page Template’ pulldown on the side. You may also want to uncheck ‘Allow Comments’ and ‘Allow Pings’.

    That should do it. You may also want to create custom header and footer files for your page, in case the default header and footer files for your theme don’t quite do what you need them to. The custom header and footer files applied to the WPG2 embedded page should be called ‘wpg2header.php’ and ‘wpg2footer.php’.

    Hope this helps.

    [Caveat – I’m using WP 2.1.3, Gallery2 v2.2 core 1.2.0, and WPG2 v2.10rc3]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WPG2 plugin’ is closed to new replies.